My Profile

Tuesday, January 25, 2011

Syntax to define a class in C#

fig: Syntax for C# Class


  • Modifiers are some special keywords which can be applied on classes, variables, methods like public, private, static, sealed etc.,
  • C# is a case sensitive language, So while designing the language Microsoft has followed few conventions in case of Cases.
  • Naming Conventions: 
  1.  All keywords should be in lower case.
  2. Under the Base class Library, pre defined classes and methods adopts propercase convention i.e., first character of every word should be in upper case.
  3. A C# program has to be saved with ".cs" extension.
  4. we can use any name for the program but the best practice will be use of Class name as a filename.

----------------------------------------------------------

** If you like this post please like our page in facebook "Dot Net Support"  

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More