using System;
class BaseClass {
publicint i = 0;
}
// Create a derived class.
class DerivedClass : BaseClass {
newint i; // this i hides the i in BaseClass
public DerivedClass(int b) {
i = b; // i in DerivedClass
}
publicvoid show() {
Console.WriteLine("i in derived class: " + i);
}
}
class MainClass {
publicstaticvoid Main() {
DerivedClass ob = new DerivedClass(2);
ob.show();
}
}