-
Notifications
You must be signed in to change notification settings - Fork 6k
C#: Need a configuration setting to change the type for arrays #1338
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
Comments
@artem-dudarev do you mind sharing more about the requirement to use Before I started working on the C# generator, it was already using List instead of [] so I just keep it that way (both are fine with me). |
This is not a must. I just think the property or method definition is shorter and more readable with array then with list. |
@artem-dudarev thanks for the suggestion. We'll leverage the help from the community to implement this in the future. |
Arrays aren't a direct replacement for If anything, I think |
@jimschubert thanks for the suggestion. May I know if you've cycle to contribute the enhancement? |
I could do this work, but it would be a breaking change. For example,
would become
This would break code previously generated against
The benefit of using The Framework Guidelines specifically say to not return
I'd need to look at the code a little more closely to see how much effort it would be. |
I created the linked pull request to demonstrate what this change would mean for consumers (see the updated tests). I chose |
@jimschubert thanks for the contribution. PR merged into master. |
@jimschubert @wing328 While there are reasons not to expose |
Currently arrays are generated as
List<T>
. I'd like to configure the generator to get real arraysT[]
.The text was updated successfully, but these errors were encountered: