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 World1
- {
- class Student : Person
- {
- // public string FNumber { get; set; }
- private string fNumber;
- public string FNumber
- {
- get { return fNumber; }
- set { fNumber = value; }
- }
- public Student()
- :this("Default", 0, "")
- { }
- public Student(string name, int age, string fNumber)
- :base(name, age)
- {
- this.fNumber = fNumber;
- }
- public override void IntroduceYourSelf()
- {
- Console.WriteLine("I am student!");
- base.IntroduceYourSelf();
- Console.WriteLine("My fNumber = {0}", fNumber);
- }
- }
- }
Add Comment
Please, Sign In to add comment