Exemplo n.º 1
0
        private static void SaveToDataFile(FileStream outFile)
        {
            //Serialize the app state
            var serializer = new DataContractSerializer(typeof(Pool));

            var g = Pool.Instance;

            var c = new GridCell();
            c.Update("test");

            g.Grid[0][0].Update("change");

            //Your app pool's identity should have write access to this file.
            serializer.WriteObject(outFile, g);
        }
Exemplo n.º 2
0
 private Pool()
 {
     Grid = new GridCell[10][];
     for (int i = 0; i < 10; i++)
     {
         Grid[i] = new GridCell[10];
         for (int j = 0; j < 10; j++)
         {
             Grid[i][j] = new GridCell();
         }
     }
 }