Jedhi Posted March 4, 2004 Posted March 4, 2004 class FindOutStructSize { byte[] buffer = new byte [5]; } // instead of 5 I would like to use the size of the struct. This force me to use unsafe code. Are there any alternative, and if not what do I really risk putting the entire class as unsafe ??? Quote
Faceless Master Posted March 4, 2004 Posted March 4, 2004 Hi, What exactly is a structure. ~Regards Faceless Master Quote Creativity Beyond Imagination http://www.facelessmaster.tk
Administrators PlausiblyDamp Posted March 4, 2004 Administrators Posted March 4, 2004 Marshal.SizeOf is probably what you need. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
praveensg Posted March 5, 2004 Posted March 5, 2004 Hi, What exactly is a structure. ~Regards Faceless Master Itz a UDT:) Quote
Faceless Master Posted March 5, 2004 Posted March 5, 2004 UDT = User Defined Datatype . Lol thnx.Got confused. ~Regards Faceless Master Quote Creativity Beyond Imagination http://www.facelessmaster.tk
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.