Esempio n. 1
0
        //**************************************Content**************************//
        //Why do we use methods?
        //Where can I declare my method?
        //How to declare method
        //Local Variables
        //Arguments/Parameters
        //Invoking a method
        //Access Modifiers
        //Variable no of args
        //Optional and Named Parameters
        //Methods Overloading
        //Returning a value from a method

        static void Main(string[] args)
        {
            Assignment2 assignment2 = new Assignment2();


            double a = 7;
            double b = 10;

            double result = AdditionOfTwoValues(7, 10);

            Printer(result.ToString());

            double result2 = AdditionOfTwoValues(17, 23);

            Printer(result2.ToString());

            double[] vals   = new double[] { 2, 3, 4, 5, 6, 7, 87, 8, 98, 9, 9, 5 };
            double   Answer = AdditionOfManyValues(vals);

            double result3 = AdditionOfTwoValues(3, y: 7);

            Printer(Answer.ToString());

            Console.WriteLine(AdditionOfTwoValues(3, 4));
        }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Vector3 v1 = new Vector3(1, 1);
        Vector3 v2 = new Vector3(0, 0);
        Vector3 v3 = new Vector3(8, 7);
        Vector3 v4 = new Vector3(5, 2);
        Vector3 v5 = new Vector3(2, 0.5f);
        Vector3 v6 = new Vector3(00.5f, 1.3f);
        Vector3 v7 = new Vector3(0, 1.5f);
        Vector3 v8 = new Vector3(1.5f, 0);

        Debug.Log("1rst Clipping : Acceptance");
        if (Assignment2.Line_Clipping(ref v1, ref v2))
        {
            Debug.Log("-----------------------------");
        }
        Debug.Log("2nd Clipping : Rejection");
        Assignment2.Line_Clipping(ref v3, ref v4);
        Debug.Log("-----------------------------");
        Debug.Log("3thd Clipping : WTO nothing");
        Assignment2.Line_Clipping(ref v5, ref v6);
        Debug.Log("-----------------------------");
        Debug.Log("4th Clipping : WTO + Vect");
        Assignment2.Line_Clipping(ref v7, ref v8);
        Debug.Log("-----------------------------");
    }
Esempio n. 3
0
    static void Main()
    {
        Assignment2 validate = new Assignment2();
        //Console.WriteLine(validate.ValidateIPAddress("192.168.56.1"));

        //var ipParts = new Byte[] { 101, 102, 103, 0 };
        var checker = validate.validateIPAddress("192.168.56.1");

        Console.WriteLine("IP Address:{0}", checker);
    }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Assignment2 App = new Assignment2();

            App.Run(); //This is a Task. If we want to do someting fun below, we are free to do so :)


            int counter = 0;

            while (true)
            {
                Thread.Sleep(1000);
                counter += 1;
                //Console.WriteLine($"Hanging around in Main()...waiting for someting fun... {counter}");
            }
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string type = ((ComboBoxItem)cbTypeContact.SelectedItem).Content.ToString();
            string icon = "";

            if (type == "Love")
            {
                icon = "EB51";
            }
            else if (type == "Person")
            {
                icon = "E80F";
            }
            else if (type == "Work")
            {
                icon = "E821";
            }
            Assignment2 db = new Assignment2(txtName.Text, (char)(Convert.ToInt32(icon, 16)), txtTel.Text, type);

            dbList.Items.Add(db);
        }
 public void SetUp()
 {
     BinaryalCoder = new Assignment2();
 }
Esempio n. 7
0
 public void SetUp()
 {
     _massiv = new Assignment2();
 }
Esempio n. 8
0
 public void SetUp()
 {
     LoveTest = new Assignment2();
 }
 public void SetUp()
 {
     _assignment2 = new Assignment2();
 }