Exemplo n.º 1
0
        public void GetPhones(string phoneBrand)
        {
            var GalaxyS8 = new MobilePhone();

            GalaxyS8.PhoneModel   = "SM-G900DS";
            GalaxyS8.MarketName   = "Galaxy S8";
            GalaxyS8.IMEI         = "358098882300987";
            GalaxyS8.SerialNumber = "SM09DRS00G";
            GalaxyS8.ReleaseDate  = "20 / 02 / 2017";

            Console.WriteLine($"Your phone is a {phoneBrand} {GalaxyS8.MarketName} {GalaxyS8.PhoneModel}");
        }
Exemplo n.º 2
0
        static void Main()
        {
            Enumeration enumeration = new Enumeration();

            enumeration.ColorSamples();
            enumeration.WeekDays();

            FurnitureStruct furniture = new FurnitureStruct();

            furniture.implementFurnitureStruct();

            Console.WriteLine(UserPreference.BackColor);

            PhoneConstructor myPhone = new PhoneConstructor("Samsung", 3);

            Console.WriteLine("Test");
            Console.WriteLine(myPhone);

            OverloadMethod result = new OverloadMethod();

            result.DoSomething(5);

            OverloadMethod overload = new OverloadMethod();

            overload.DisplayResult("Test overload of string");
            overload.DisplayResult(20);

            ManipulateMath.Execute();

            MobilePhone mobilePhone = new MobilePhone();

            mobilePhone.GetPhones("Samsung");

            Loops loops = new Loops();

            loops.ImplementForLoop();
            loops.NestedForLoop();
            loops.ImplementWhileLoop();
            loops.ImplementDoWhile();
            loops.ImplementForEach();

            Conditionals conditionals = new Conditionals();

            conditionals.ImplementIfElse();
            conditionals.ImplementIfElseIf();
            conditionals.ImplementSwitch();
            conditionals.InteractiveSwitch();

            snippet1.variables();

            ScopeClashes.TestScoping();
        }