static int GetInt32(string path, int index) { FileStream stream = new FileStream(path, FileMode.Open);
stream.Position = index * 4;
byte[] bytes = new byte[4];
stream.Read(bytes, 0, 4);
int value = BitConverter.ToInt32(bytes, 0);
stream.Close();
return value; }
static void SetInt32(string path, int index, int value) { FileStream stream = new FileStream(path, FileMode.OpenOrCreate);
stream.Position = index * 4;
byte[] bytes = BitConverter.GetBytes(value);
stream.Write(bytes, 0, 4);
stream.Close(); }
--
You received this message because you are subscribed to a topic in the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/personal-kdbplus/bK1AmUq1ciU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.