Skip to content

Naming convention of local functions? #8852

Closed Answered by CyrusNajmabadi
weitzhandler asked this question in Q&A

You must be logged in to vote

There is no set convention on this. Roslyn compiler, for example, uses camelCase, as it views these just as locals, and locals are camelCased names.

Roslyn IDE, on the other hand, used PascalCase to distinguish non-captured local-functions vs captured delegates. That way casing can indicacte if you expect this to just be a function that is called, versus a delegate instance that will be allocated and passed around.

Use whatever you prefer.

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by CyrusNajmabadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants