• در نام گذاری کلاسها و متدها از روش PascalCasing استفاده میکنیم:
    public class ClientActivity
    {
        public void ClearStatistics()
        {
            //...
        }

        public void CalculateStatistics()
        {
            //...
        }
    }

    • برای نام گذاری آرگومان های ورودی توابع و همچنین متغیر های Local از camelCasing استفاده میکنیم:
    public class UserLog
    {
        public void Add(LogEvent logEvent)
        {
            int itemCount = logEvent.Items.Count;
            // ...
        }
    }
    
    • از به کاربردن حروف مختصر که نشان دهنده نوع میباشد اجتناب کنید:
        // صحیح
        int counter;
        string name;    
        // اجتناب کنید
        int iCounter;
        string strName;
    
    • برای نام گذاری متغیرهای Const از نام گذاری با حروف بزرگ خودداری کنید و از PascalCasing استفاده نمایید:
        // Correct
        public static const string ShippingType = "DropShip";
         
        // Avoid
        public static const string SHIPPINGTYPE = "DropShip";
    
    • از به کاربردن کلمات مختصر به جای کلمات کامل خودداری کنید. (کلمات مختصر کاربرد خودشان را دارند مثلا استفاده از  url یا id صحیح است اما grp به جای Group حرفه ای نیست!)
        // Correct
        UserGroup userGroup;
        Assignment employeeAssignment;
         
        // Avoid
        UserGroup usrGrp;
        Assignment empAssignment;
         
        // Exceptions
        CustomerId customerId;
        XmlDocument xmlDocument;
        FtpHelper ftpHelper;
        UriPart uriPart;
    
    • از آندرلاین در بین کلمات استفاده نکنید. (البته میتوان برای متغیرهای Private در اول کلمه استفاده کرد)
          // Correct
          public DateTime clientAppointment;
          public TimeSpan timeLeft;
           
          // Avoid
          public DateTime client_Appointment;
          public TimeSpan time_Left;
           
          // Exception
          private DateTime _registrationDate;
    • بجای استفاده از نام های system type از نام های predefined type استفاده کنید. (مثلا بجای Int32 از Int که به یک معنی هستند استفاده شود)
        // Correct
        string firstName;
        int lastIndex;
        bool isSaved;
         
        // Avoid
        String firstName;
        Int32 lastIndex;
        Boolean isSaved;
    
    • برای نام گذاری کلاس ها از اسم یا عبارت استفاده نمایید:
          public class Employee
          {
          }
          public class BusinessLocation
          {
          }
          public class DocumentCollection
          {
          }
    • قبل از نام interface ها از I استفاده کنیم:
          public interface IShape
          {
          }
          public interface IShapeCollection
          {
          }
          public interface IGroupable
          {
          }
    • نام فایل ها را همانند نام کلاس اصلی قرار دهیم:
        // Located in Task.cs
        public partial class Task
        {
            //...
        }
    • namespace ها را با یک ساختار واضح سازماندهی کنید:
          // Examples
          namespace Company.Product.Module.SubModule
          namespace Product.Module.Component
          namespace Product.Layer.Module.Group
    • علائم آکولاد ها را به صورت عمودی مرتب نمایید. (Vertically align)
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
    • تمامی متغیرهای یک کلاس را در بالاترین قسمت ممکن قرار دهید، متغیرهای استاتیک نیز از همه بالاتر قرارگیرند:
          // Correct
          public class Account
          {
              public static string BankName;
              public static decimal Reserves;
           
              public string Number {get; set;}
              public DateTime DateOpened {get; set;}
              public DateTime DateClosed {get; set;}
              public decimal Balance {get; set;}
           
              // Constructor
              public Account()
              {
                  // ...
              }
          }
    • در نام گذاری enum از نام های مفرد استفاده کنید:
      // Correct
      public enum Color
      {
          Red,
          Green,
          Blue,
          Yellow,
          Magenta,
          Cyan
      }
    • در enum به صورت صریح نوع را مشخص نکنید:
          // Don't
          public enum Direction : long
          {
              North = 1,
              East = 2,
              South = 3,
              West = 4
          }
           
          // Correct
          public enum Direction
          {
              North,
              East,
              South,
              West
          }
    • از پسوند enum در نامگذاری enum ها استفاده نکنید:

        // Don't
        public enum CoinEnum
        {
            Penny,
            Nickel,
            Dime,
            Quarter,
            Dollar
        }
         
        // Correct
        public enum Coin
        {
            Penny,
            Nickel,
            Dime,
            Quarter,
            Dollar
        }