How to Read First 512 Bytes of data from a .dat file in C#?
<p>H,</p>

<p>How to Read First 512 Bytes of data from a .dat file in C# ?
My dat files contains binary data.
I am using <code>File.ReadAllBytes</code> currently to read data from the dat file.But it Reads all the data, i want to read only first 512 bytes then break.
I need to use for loop for this or any other approach.
Any help is appreciated.</p>
