Archived

This topic is now archived and is closed to further replies.

Safe C# equivalent of sizeof

This topic is 5004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
There is a method called SizeOf in System.Runtime.InteropServices.Marshal.

E.g. Marshal.SizeOf(Type.GetType("System.Double")
returns 8 on my machine.

Share this post


Link to post
Share on other sites