Пример #1
0
        public static void Write(byte[] data)
        {
            int errorCode = PersistentMemory.WriteNative(data);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Пример #2
0
        public static byte[] Read()
        {
            byte[] persistantMemory = new byte[0x10000];
            int    errorCode        = PersistentMemory.ReadNative(persistantMemory);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            return(persistantMemory);
        }