-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Inconsistent naming conventions for delegate instances #33959
Comments
The text is correct in both places, but should be clarified. Delegate types and methods that are delegate targets are PascalCased. variables that are instances of a delegate type are camelCased. I'll add this as an enhancement to udpate this article. |
Thanks for the response. "variables that are instances of a delegate type are camelCased." -This is clear. For example, the following is clear: The confusion arises for the following examples. Please note the following two cases:
Case-2(camelCase is used ):
or, see the following line:
Additional Example/info:
So, a littlebit info on this issue can help us. Finally, I have formulated a question with a simple case-study that can help to clear the confusion:
-Does this program follow the intended and correct naming convention? |
Adding to the July sprint as I'm updating this article. |
Fixes dotnet#30626: Clarify (again) that these are our guidelines, not yours. Point out that it's not the VS default, but a configuration option. Fixes dotnet#30642: Again, our style. Fixes dotnet#30799: Change constant style from ALL_CAPS to PascalCase to match runtime repo. Fixes dotnet#33959: Update variable names so delegate types are PascalCased and instances of a delegate are camelCase. Add clarifying text for the same.
Here the delegate instances are following the pascal casing naming convention. But the following link: https://learn.microsoft.com/en-us/dotnet/api/system.func-1?view=net-7.0 shows the use of the camel casing naming convention. Which one should we follow?Any thoughts?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 123092
The text was updated successfully, but these errors were encountered: