Alex Rivera | Logout

Naming Convention in c#

Asked 2009-10-24T15:42:39.270
33

What is the universally accepted naming convention for c#? (functions, classes, parameters, local variables, namespaces, etc)

Edit
Report

2 Answers

4

The .NET standard from Microsoft is to use Pascal Case for namespaces, public and protected members (basically anything visible to other classes). For private members and local variables, there's a much wider berth to just do whatever you and your team are most comfortable with.

answered 2009-10-24T15:45:07.407
1

I'd have a look at the slim book called "Elements of C# Style" by Baldwin, Gray, & Misfeldt. The blue book covers naming conventions, and many other aspects of creating consistent, clean, readable code.

answered 2009-10-24T15:58:48.487

Your Answer