Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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[])
{
}
}
Posted
Comments
[no name] 18-Sep-13 8:00am    
Since your program is not running the size would be zero.

1 solution

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[^]
 
Share this answer
 
Comments
Sriram Bala 18-Sep-13 8:40am    
Nice Search and Finding.
Sriram.B
Faisalabadians 19-Sep-13 4:03am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900