Hello,
I need to interact with the Win32 API "BackupRead," and it returns a byte
array as one of its parameters.
I need to be able to cast the first part of the byte array into a special
structure that describes the data contained in the rest of the byte array.
How can I do this? For example:
byte [] A = new byte[100];
struct SpecialStruct
{
int a;
string b;
};
// I want to be able to perform a cast-like operation such as this:
SpecialStruct S = (SpecialStruct) A; // Remember, A is the byte array
How can I accomplish something like this in C#??
Thank you very much,
Rich