Esempio n. 1
0
        static void Main(string[] args)
        {
            MyMathClass mc = new MyMathClass();

            Console.WriteLine("My sqaure area is " + mc.MySquare(5));

            Console.WriteLine("My sqaure area is " + mc.MyCube(5));
        }
Esempio 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();
 }
Esempio n. 3
0
File: Form1.cs Progetto: 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();
        }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        MyMathClass myObject;

        myObject = new MyMathClass(10, 10);
        int sumOfElements = myObject.SumOfElements();

        Debug.Log(sumOfElements);
        MyMathClass myObject2;

        myObject2     = new MyMathClass(5, 50);
        sumOfElements = myObject2.SumOfElements();
        Debug.Log(sumOfElements);
        int[] myArray = new int[25];
        for (int i = 0; i < myArray.Length; i++)
        {
            myArray[i] = i;
        }
        int max = MyMathClass.GetMax(myArray);

        Debug.Log(max);
    }