C#中空类的大小是多少? [英] What is the size of an empty class in C# ?
本文介绍了C#中空类的大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
有谁能告诉我C#中空类(消耗的内存)的大小是多少???
如果是这种情况,
class Sample
{
public static void main(String args [ ])
{
}
}
Hi Guys,
Can anyone tell me what will be the size of the empty class ( Memory consumed ) in C# ??
If this is the case ,
class Sample
{
public static void main ( String args[])
{
}
}
推荐答案
16个字节 - 内存管理员可以处理的最小值。
这里有一个很好的解释: http://stackoverflow.com/questions/3694423/size-of-a-class-object-in-net [ ^ ]
16 bytes - the minimum the memory manager can handle.
There is a good explanation here: http://stackoverflow.com/questions/3694423/size-of-a-class-object-in-net[^]
这篇关于C#中空类的大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文