コード例 #1
0
 public CalculatorViewModel()
 {
     CalculationData = new DataSet();
     CalculationData.A = 45;
     CalculationData.B = 9;
     Calculator = new Calculator(CalculationData);
     Calculator.Add = 12;
     Calculator.Sub = 21;
     Calculator.Mul = 12;
     Calculator.Div = 21;
 }
コード例 #2
0
        private static void Main(string[] args)
        {
            var data = new DataSet();
            data.A = 3;
            data.B = 4;

            var calculator = new Calculator(data);

            data.A = 6; // This will

            // Unsubscribe from all events.
            calculator.Dispose();
        }