-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow one parameter to specify members for int based enums #127
Comments
This has now been implemented on a branch and will be merged shortly. [Members("Standard, Gold, Platinum")]
public partial class CustomerType; I tried to extend the feature to take names and values, e.g. [Members(("Standard", 100), ("Gold", 200), ("Platinum", 300)] ... but there is a restriction on parameters in attributes as described here: dotnet/csharplang#1979 The new 'params collections' in C# 13 won't help either as it's not possible to use |
Hm, looks like it is implemented for int type only, when I asked it for string underlaying type (SteveDunn/Vogen#562).
|
Thanks @arteny - sorry about that, I'll take a look soon, hopefully within the next day or so. |
This is now implemented and released. |
Describe the feature
Taken from this feature request: SteveDunn/Vogen#562
Instances of ints should allow just one parameter to describe members; the values of which start at zero and increment, just like normal enums
The text was updated successfully, but these errors were encountered: