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