How to use a blittable type representing a string
<p>I am trying to use the ReadUsingPointer Method described <a href="http://www.codeproject.com/Articles/25896/Reading-Unmanaged-Data-Into-Structures" rel="nofollow">here</a> to have a light spead binary reader for huge binary files. <br>However, the struct I am trying to pass to it contains strings. I was wondering how I could circumvent this and avoid the "cannot take the address of, get the size of, or declare a pointer to a managed type" message</p>

<p>I tried the following with no success so far (maybe having accessors to these fields is the problem?):</p>

<pre><code> [MarshalAs(UnmanagedType.LPStr)]
 string s;
</code></pre>

<p>I have to specify that these string fields are used after reading and are not assigned while reading the bytes, so I do not need them while reading (I could use an intermediary struct without these fields but for legacy issues I can't do this).</p>
