title: Size of A Class (object) in .NET
body: <p>How to determine if a Class in .NET is big or small? Is it measured on how many it's attributes or fields, datatype of its attributes/fields? or return type of methods? parameters of it's methods? access modifier of its methods, virtual methods? thanks..</p>
  
  <pre><code> class A
  {
  
    string x { get; set; }
  }
  
  class B 
  {
    int x { get; set; }
  }
  </code></pre>
  
  <p>in this example if I instantiate class A and B like this</p>
  
  <pre><code> A objA = new A();
   B objB = new B();
  </code></pre>
  
  <p>Is class objA the bigger one because it holds an String property and objB holds only an Int? although I didn't set any value to it's property. thanks</p>
  
  <p><strong>EDIT: Just to clarify my question</strong></p>
  
  <p>suppose i have a class</p>
  
  <pre><code>public class Member
  {
      public string MainEmpId { get; set; }
      public string EmpId { get; set; }
  }
  </code></pre>
  
  <p>and another class </p>
  
  <pre><code>public class User
  {
      public string AccessLevel { get; set; }
      public string DateActivated { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Mi { get; set; }
      public string Password { get; set; }
      public string UserId { get; set; }
      public string UserName { get; set; }
      public string Active { get; set; }
      public string ProviderName { get; set; }        
      public string ContactPerson { get; set; }
      public string Relation { get; set; }
      public string Landline { get; set; }
      public string MobileNo { get; set; }
      public string Complaint { get; set; }
      public string Remarks { get; set; }
      public string Reason { get; set; }
      public string RoomType { get; set; }
  }
  </code></pre>
  
  <p>if I instantiate it like this</p>
  
  <pre><code>  Member A = new Member();
    User B = new User()
  </code></pre>
  
  <p>is the object A larger than object B?
  I know it's an odd question but I believe every intantiation of an object eats memory space..</p>