Class may have methods with the same name but different parameter numbers or types, which is overriding.
class A { public int i; public string str; public A() { i = 2; } public string irate(double d) { double d2 = i * (1 + d); return d2.ToString(); } public string irate(string s) //overrided method irate { return s; } }
class human { public int age; public string sex; public human(int a, string s) {age=a;sex=s;} } class student : human { int grade; public student(int a, string s, int g) : base(a, s) { age = a; sex = s; grade = g; } }