Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace World
- {
- class Student : Person
- {
- // public string Name { get; set; }
- private int fNumber;
- public int FNumber
- {
- get {return fNumber;}
- set { fNumber = value; }
- }
- public Student(string name, int age, int fNumber)
- :base(name, age)
- {
- this.fNumber = fNumber;
- }
- // public new void IntroduceYourSelf()
- public override void IntroduceYourSelf()
- {
- Console.WriteLine("-------------Student-----------------");
- base.IntroduceYourSelf();
- Console.WriteLine("fNumber = {0}", fNumber);
- Console.WriteLine("---------------End------------------");
- }
- public override string ToString()
- {
- return base.ToString() + " fNumber = " + fNumber;
- }
- }
- }
Add Comment
Please, Sign In to add comment