What is the C# standard for capitialising method names?

C#Naming Conventions

C# Problem Overview


What is the C# standard for capitialising method names? Is it:

MyClass.MyMethod()

or

MyClass.myMethod()

?

C# Solutions


Solution 1 - C#

The first one is right following the .NET Capitalization Conventions

Solution 2 - C#

First one is standard in C#, second is standard in Java

Solution 3 - C#

C# Method are normally in PascalCase. See the guidelines here.

Solution 4 - C#

Microsoft recommend to Use The first Approach.

Solution 5 - C#

Pascal case is the standard for .NET in general and C# in particular.

Solution 6 - C#

Don't believe there is a standard, It's what ever you, and those you work with prefer. The most common i've seen is PascalCasing for Methods and Camel for private variables etc.

Solution 7 - C#

.NET Naming standards say that you should use Pascal Case:

See Method Naming Guidelines

Solution 8 - C#

Camel case vs proper case. The 100% Approved Right Way (TM) for C# is the latter.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCraig JohnstonView Question on Stackoverflow
Solution 1 - C#il_guruView Answer on Stackoverflow
Solution 2 - C#Øyvind BråthenView Answer on Stackoverflow
Solution 3 - C#jb.View Answer on Stackoverflow
Solution 4 - C#Nasser HadjlooView Answer on Stackoverflow
Solution 5 - C#Anton GogolevView Answer on Stackoverflow
Solution 6 - C#F.B. ten KateView Answer on Stackoverflow
Solution 7 - C#jwwishartView Answer on Stackoverflow
Solution 8 - C#kprobstView Answer on Stackoverflow