Quote Originally Posted by jmcilhinney
I've actually never written any unsafe code in C# but I would expect it would be something like:
CSharp Code:
  1. byte* p = &myStructure;
That would do the trick in C++, although C# may have an issue with converting the address of one type to a pointer of another type. You may have to cast like this:
CSharp Code:
  1. byte* p = (byte*)&myStructure;
Also, I'm not 100% sure that the addressof operator (&) from C/C++ has carried over, but I'm guessing it has.

Edit: Just checked and that second code snippet does the trick.
and why did i never think of that?
thanks