C sharp Naming Conventions To be Follow while Development.


C sharp Naming Conventions :-



Do These

             a) PascalCasing for class names and method names.

                                                     Eg.
                                   Why: consistent with the Microsoft's .NET Framework and easy to read.

          b) camelCasing for method arguments and local variables.

                                                   Eg.
                                   Why: consistent with the Microsoft's .NET Framework and easy to read.

          c) predefined type names instead of system type names like Int16, Single, UInt64, etc

                                                      Eg.
                                         Why: consistent with the Microsoft's .NET Framework and easy to read.

            d)  noun or noun phrases to name a class.

                                                       Eg.

                                      Why: consistent with the Microsoft's .NET Framework and easy to read.

          e) prefix interfaces with the letter I.  Interface names are noun (phrases) or adjectives.

                                                     Eg.
                               
                                    Why: consistent with the Microsoft's .NET Framework and easy to read.

            f) name source files according to their main classes.

                                                        Eg.

                                     Why: consistent with the Microsoft's .NET Framework and easy to read.

         g) declare all member variables at the top of a class, with static variables at the very top.
                                             
                                                Eg.

                                  Why: consistent with the Microsoft's .NET Framework and easy to read.


Happy Programing

No comments

Powered by Blogger.