Q:

How do you get the size of value type?

0

How do you get the size of value type?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

using SizeOf operator.
Example: Console.WriteLine(“The size of long is {0}.”, sizeof(long));
output: The size of long is 8.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Top 100 C# interview questions and answers 2022

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What are different types of the parameter in c#?... >>
<< What is the difference between value types and ref...