コード例 #1
0
    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;
    }
コード例 #2
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);
    }
コード例 #3
0
        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);
        }