Пример #1
0
        static void FunctionExecutionExample()
        {
            ScienceSubject ss = new ScienceSubject();
            //ss.Test(10);

            var a = new Arithmetic();

            var b = new Arithmetic(25);
        }
Пример #2
0
        static void PropertiesExample()
        {
            ScienceSubject science = new ScienceSubject();

            science.MarksObtained = -30;

            Console.WriteLine("Marks in science => " + science.MarksObtained);

            Student s = new Student();

            s.Setnames("Subham", "Koirala");

            Console.WriteLine("Student FullName => " + s.FullName);

            Student s1 = new Student();

            s1.Setnames("Saroj", "Koirala");

            Console.WriteLine("Student FullName => " + s1.FullName);



            StudentNew sNew = new StudentNew();

            sNew.FName = "Saroj";
            sNew.LName = "Koirala";

            Console.WriteLine("Student FullName => " + sNew.FName + "." + sNew.LName);

            StudentNew sNew1 = new StudentNew();

            sNew1.FName = "Saroj";
            sNew1.LName = "Koirala";

            Console.WriteLine("Student FullName => " + sNew1.FName + "." + sNew1.LName);
        }