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); }
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(); } } }