I have a byte[] returned from an unmanaged dll. If I was in c/c++ I would
do something like this:
void* pData; // a pointer to a struct with various types
int i;
int* i = &i;
*i = *pData;
or something like that, it's been awhile...
but in c#, I can't find the solution. I have looked at Convert.ToInt32 but
it will only take a single byte type which isn't enough.
I tried using unsafe but didn't find success.
I have google and googled, but nothing is coming up for me solution. I
found one article that sounded promising utilizing BinaryFormatter, but
wasn't able to get it to work.
Anyone have an example how to case an array of bytes to various managed
types?
Thanks,
Steve