C# naming conventions

Before we discuss the naming conventions used in C#, let’s talk about a few conventions that exist.

PascalCasing

In pascal casing, two or more words are placed together without any space or underscore ( _ ); however, the first letter of each word is capitalized.

svg viewer

camelCasing

In camel casing, two or more words are placed together without any space or underscore ( _ ), but the first letter of the first word is in lowercase and the first letter of the next word is capitalized.

svg viewer

snake_case

In snake case, two plus words are placed together with an underscore ( _ ) and no capitalized letters.

svg viewer

C# naming conventions

Notation
Class PascalCase
Methods PascalCase
Method Arguments camelCase
Local Variables camelCase

Code

Public class HelloWorld {
       int saveValue;
       Public void PrintHelloWorld( string loadStr ){
        /..../
      }
}

Avoid using abbreviations and screaming capitalization, i.e., SAVEVALUE

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved