public static void Main(string[] args) { IntCell m = new IntCell( ); m.Write(5); Console.WriteLine("Cell contents: " + m.Read( )); // The next line would be illegal if uncommented // m.storedValue = 0; }
static void Main(string[] args) { IntCell m = new IntCell( ); m.Write(5); Console.WriteLine("Cell contents: " + m.Read( )); m.State = 8; Console.WriteLine("Cell contents: " + m.Read( ) + " " + m.State); m.State = 100; Console.WriteLine("Cell contents: " + m.Read( ) + " " + m.State); }
private List <CellInfo> GetIntCellInfo(int cellCount) { for (int i = 0; i < cellCount; i++) { IntCell intCell = new IntCell(1); Global.LocalStorage.SaveIntCell(intCell); } var cells = Global.LocalStorage.GetEnumerator(); List <CellInfo> cellInfoList = new List <CellInfo>(); while (cells.MoveNext()) { cellInfoList.Add(cells.Current); } return(cellInfoList); }