コード例 #1
0
      static void Main()
      {
          // Organization organization = new Organization();
          //Organization.DisplayOrg();
          Employee employee = new Employee();

          //acess parent class information through child class object
          employee.location = "chennai";
          employee.DisplayOrg();
          employee.DisplayEmployee();
          Console.Read();
      }
コード例 #2
0
            static void Main()
            {
                //Organization organization = new Organization();
                //organization.DisplayOrg();
                Employee employee = new Employee();

                //access parent class info with child class object
                employee.Orgname = " LTI";
                employee.DisplayOrg();
                employee.DisplayEmployee();
                Console.Read();
            }
コード例 #3
0
        static void Main()
        {
            Employee employee = new Employee();

            // accessing parent class details through child class
            // non static information from parent class can be accessed through child class object, when protected is given
            employee.location = " Hyderabad";
            employee.DisplayOrg();
            employee.DisplayEmp();

            Console.Read();
        }