public int PutBoolean(bool var) { int prevIndex = WrittenBytes; Write(BitConverter.GetBytes(var), 0, sizeof(bool)); return prevIndex; }