private Int32 readInt32FromFile(string filename, int offset)
{
Int32 retval = 0;
FileStream fs = new FileStream(filename, FileMode.Open);
fs.Seek(offset, SeekOrigin.Begin);
using (BinaryReader br = new BinaryReader(fs))
{
retval = br.ReadInt32();
}
fs.Close();
return retval;
}