-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create constructor overload for PrimaryEntityIndex and EntityIndex without name #1042
Comments
I think you might have an incomplete understanding of
Since If you're dead-set on not using
The best thing you can do is exactly what you're doing now. See here for more justification. |
Thank you for the reply. This issue came from me copy/pasting an index file and forgetting to change the nameof(TileIndex). I did want the super class to do GetType().Name. I wonder if I can create my own superclass and use a generic type. |
Your editor probably has a file templates feature that'll let you fill out a form or something. I use Rider, so I use the feature described here. This is exactly what file templates are for! |
I find it very comfortable to put the name of the class as the index name, but I'd rather not HAVE to write nameOf.
My request is having 1 or more super constructor overloads to omit that parameter and just do nameof(this) inside of it.
The text was updated successfully, but these errors were encountered: