How much memory in bytes do types like int, bool, float, double, decimal, object, and string use when added as a field to an instance of a class?
How much memory in bytes do types like int , bool , float ,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This page shows the size of each datatype in bits (divide by 8 to get bytes):
Object and string are reference types. Reference types take up at least the size of all the fields they contain plus the size of the reference itself.
Related