示例#1
0
        private static void IntroductionToClasses()
        {
            Console.WriteLine("--------Introduction to Classes----------");
            var person = new Person();

            person.Name = "Emilly";
            person.Introduce("Maria");

            var personStatic = Person.ParseStatic("Emilly");

            person.Introduce("José");
        }
示例#2
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.Name = "John";
            person.Introduce("Enea");
        }
示例#3
0
        static void Main(string[] args)
        {
            var persoon = new Person();

            persoon.Name = "John";
            var zelf = "Polleke";

            persoon.Introduce("Polleke");
            var p1 = new Person();

            p1.Name = "Pee 1";
            p1.Introduce(zelf);
            var p2 = new Person();

            p2.Name = "Pee 2";
            p2.Introduce(zelf);
            var p3 = new Person();

            p3.Name = "Pee 3";
            p3.Introduce(zelf);
            var p4 = new Person();

            p4.Name = "Pee 4";
            p4.Introduce(zelf);
        }
示例#4
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.Name = "Nate";
            person.Introduce("Kaylee");
        }
示例#5
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.name = "Henrique";
            person.Introduce("Machine");
        }
        static void Main(string[] args)
        {
            var person = new Person("Riku");

            person.Introduce("reader");

            var customer = new Customer(person);

            customer.Buy("Sublime license");

            var person2 = new Person("Saya");

            person2.Introduce("everyone");

            var customer2 = new Customer(person2, 1530, true, "green tea");

            customer2.Buy("green tea");

            var r         = new Random();
            var customer3 = new BetterCustomer(r.Next(1, 1000))
            {
                Person = person
            };

            customer3.Order("pizza with pineapples");
        }
示例#7
0
        static void Main(string[] args)
        {
            var john = new Person();

            john.FirstName = "Paul";
            john.LastName  = "Padian";
            john.Introduce();
        }
示例#8
0
        static void Main(string[] args)
        {
            Person John = new Person();

            John.FirstName = "John";
            John.LastName  = "Smith";
            John.Introduce();
        }
示例#9
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.Name  = "Cat";
            person.House = "ENG";
            person.Introduce("Teddy");
        }
示例#10
0
        static void Main(string[] args)
        {
            Person person = new Person();  //var= Person

            person.fName = "Huzaifa";
            person.lName = "Shah";
            person.Introduce();
        }
示例#11
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.firstName = "John";
            person.Introduce("Mosh");
            var person2 = Person.Parse("John2");
        }
示例#12
0
        static void Main(string[] args)
        {
            //Person john = new Person();
            var john = new Person();

            john.firstName = "Rajiv";
            john.lastName  = "Nair";
            john.Introduce();
        }
示例#13
0
        static void Main(string[] args)
        {
            Person.Introduce();

            Carro corsa = new Carro();

            corsa.modelo = "Corsinha Amarelo";
            corsa.QualModelo();
        }
示例#14
0
        static void Main(string[] args)
        {
            var john = new Person();

            john.firstName = "John";
            john.lastName  = "Smith";

            john.Introduce();
        }
示例#15
0
        static void Main(string[] args)

        {
            var person = new Person();

            person.name = "bulbul";

            person.Introduce("ninad");
        }
示例#16
0
        static void Main(string[] args)
        {
            Person harry = new Person();

            harry.FirstName = "Harry";
            harry.LastName  = "Wu";
            harry.Introduce();

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            var person  = new Person();
            var person2 = Person.Parse("John"); // Notice how Parse can be called on the Person class itsself

            person.Name = "Cindy";
            person.Introduce("John");

            person2.Introduce("Cindy");
        }
示例#18
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.Name = "Mark";
            person.Introduce("Mosh");

            var person2 = Person.Parse("John");

            person2.Introduce("Bob");
        }
示例#19
0
        static void CreateClasses()
        {
            Person person = Person.Parse("John");

            person.Introduce("Peter");

            var customer = new Customer(1);

            System.Console.WriteLine(customer.Id);
            System.Console.WriteLine(customer.Name);
        }
示例#20
0
        static void Main(string[] args)
        {
            var john = new Person();

            john.FirstName = "John";
            john.LastName  = "Smith";
            john.Introduce();
            Calculator calculator = new Calculator();
            var        result     = calculator.Add(1, 2);

            Console.WriteLine(result);
        }
示例#21
0
        static void Main(string[] args)
        {
            var john = new Person();

            john.firstName = "Sharon";
            john.lastName  = "Cheeran";
            john.Introduce();

            var Calc = new Calculator();

            Console.WriteLine(Calc.add(5, 6));
        }
示例#22
0
        static void Main(string[] args)
        {
            var user = new Person();    // No need to import if it's in the same namespace

            user.FirstName = "John";
            user.LastName  = "Doe";
            user.Introduce();

            var calc = new Calculator(); // use custom method from another namespace => need import from Classes.CustomMath

            Console.WriteLine(calc.Add(1, 2));
        }
        static void Main(string[] args)
        {
            Person john = new Person();

            john.firstName = "John";
            john.lastName  = "Smith";
            john.Introduce();

            var result = Calculator.Add(2, 3);

            System.Console.WriteLine("Result : " + result);
        }
示例#24
0
        public static void Main(string[] args)
        {
            var john = new Person();

            john.firstName = "John";
            john.lastName  = "Smith";
            john.Introduce();

            Calculator calc   = new Calculator();
            var        result = calc.Add(2, 4);

            Console.WriteLine(result);
        }
示例#25
0
        public static void Main(string[] args)
        {
            Person bernat = new Person();

            bernat.firstName  = "Bernat";
            bernat.secondName = "Ferragut";
            bernat.Introduce();

            Calculator calculator = new Calculator();
            var        result     = calculator.Add(3, 2);

            Console.WriteLine(result);
        }
示例#26
0
        static void Main(string[] args)
        {
            var Ziga = new Person();

            Ziga.firstName = "Ziga";
            Ziga.lastName  = "Zlogar";
            Ziga.Introduce();

            var cal    = new Calculator();
            var result = cal.Add(3, 4);

            Console.WriteLine(result);
        }
示例#27
0
        static void Main(string[] args)
        {
            var wu = new Person();

            wu.FirstName = "Hongyu";
            wu.LastName  = "Wu";
            wu.Introduce();

            Calculator calculator = new Calculator();
            var        result     = calculator.Add(1, 2);

            Console.WriteLine(result);
        }
示例#28
0
        public static void Main(string[] args)
        {
            Person daisuke = new Person();

            daisuke.FirstName = "Daisuke";
            daisuke.LastName  = "Niwa";
            daisuke.Introduce(); // My name is Daisuke Niwa

            Calculator calculator = new Calculator();
            var        result     = calculator.Add(1, 2);

            Console.WriteLine(result);
        }
示例#29
0
文件: Program.cs 项目: Rakon/C-
        static void Main(string[] args)
        {
            var David = new Person();

            David.VoorNaam   = "David";
            David.AchterNaam = " Duym";
            David.Introduce();

            var calc   = new calc();
            var result = calc.Add(1, 2);

            Console.WriteLine(result);
        }
示例#30
0
文件: Program.cs 项目: jxxparker/c-
        static void Main(string[] args)
        {
            var name = new Person();

            name.FirstName = "Jihun";
            name.LastName  = "Park";
            name.Introduce();

            Calculator calculator = new Calculator();
            var        result     = calculator.Add(1, 2);

            System.Console.WriteLine(result);
        }