Hi all,
My C# is VERY basic, but I've been given the task of converting a C++ program into C# anyway. This part of the program is pretty simple, and is trying to read a certain amount of bytes out of a file into a struct. C++ example:
Obviously, now I could get myS.a and the like of.Code:struct myS
{
char c[4];
DWORD a;
DWORD b;
}
.....
myS m_myS;
fread(&m_myS, sizeof(m_myS), 1, myFileStream);
Either way, I need to recreate this in C# and I can't seem to work out how. Using Read() throws an error as it wants a byte array. I can't get the sizeof(myS) nor m_MyS.
Am I missing something here?