Size of A Class (object) in .NET

后端 未结 6 959
灰色年华
灰色年华 2020-11-28 09:31

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? par

6条回答
  •  清歌不尽
    2020-11-28 10:18

    You can also check: how-much-memory-instance-of-my-class-uses. There is easy way to test size of object after constructor is called.

提交回复
热议问题