Ejemplo n.º 1
0
Archivo: Form1.cs Proyecto: WssIDs/TKP
        private void button3_Click(object sender, EventArgs e)
        {
            DateTime Start = DateTime.Now;
            var      obj   = new MyMathClass();

            txtZ.Text = (obj.Add(Convert.ToDouble(txtX.Text), Convert.ToDouble(txtY.Text))).ToString();

            for (int i = 0; i < ITERATIONS; i++)
            {
                obj.Add(Convert.ToDouble(txtX.Text), Convert.ToDouble(txtY.Text));
            }

            txtTime3.Text = ((DateTime.Now - Start).TotalSeconds).ToString();
        }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     MyMathDLL.MyMathClass math = new MyMathClass();
     Console.WriteLine(math.Add(3, 4));
     Console.WriteLine(math.Divide(4, 2));
     Console.WriteLine(math.Multiply(5, 88));
     Console.WriteLine(math.Subtract(5, 6));
     Console.ReadLine();
 }
Ejemplo n.º 3
0
 public void AddTest()
 {
     Assert.IsTrue(m.Add(2, 3) == 5);
 }