How do I save a class's Raw Data (without .NET object data) to a binary file?



I want to save the raw data of a class (without the .NET object
overhead) to a binary file. For example:
ref class Test
{
public:
String^ name;
Int32 number;
.....
}

I want to save the raw characters of the string and the raw integer
without the additional .NET Object data. I am trying to create an
array of Bytes and cast that array as my class, but the casting fails.
I was then going to write the Array out using a BinaryFormater object,
but I first need to cast the array as my class so I can easily stuff
the array. Can anyone help by providing an example of casting an array
of Bytes to a managed class, or of writing the actual raw data of a
class to a file?

.



Relevant Pages

  • biologist new to matlab
    ... I have a vector of spike times from a physiology experiment. ... way to convert my raw data (a 1x3 array) to a 1x20 array in which ... each element is zero, except for the fourth, tenth, and fifteenth, ... value of an element in my raw data to 1. ...
    (comp.soft-sys.matlab)
  • Re: biologist new to matlab
    ... I have a vector of spike times from a physiology experiment. ... way to convert my raw data (a 1x3 array) to a 1x20 array in which ... each element is zero, except for the fourth, tenth, and fifteenth, ... value of an element in my raw data to 1. ...
    (comp.soft-sys.matlab)
  • Calculate Average by Date from Text File
    ... and the average value to a to an array and then output it to a text ... can't figure out how to summarize the raw data into an array or ... a while but with no luck. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Calculate Average by Date from Text File
    ... > and the average value to a to an array and then output it to a text ... > can't figure out how to summarize the raw data into an array or ... > Private Sub btnWriteOutputFile_Click(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)