How do you determine the size required by a Value type on the stack

A) Length operator
B) Sizeof operator
C) Mem operator

Showing Answers 1 - 4 of 4 Answers

Sreerenj

  • Mar 24th, 2006
 

Ans. B) Sizeof operator

The sizeof operator is used to obtain the size in bytes for a value type. A sizeof expression takes the form:

sizeof(type)
where type is the value type of which the size is obtained

LordAlex

  • Nov 7th, 2011
 

B) sizeof operator for integral types only (byte,...,int ,,)

For other use
System.Runtime.InteropServices.Marshal.SizeOf(...);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions