hi firends
i have a base class and a child class.i write a method with its document in my parent class and i want to change that document in my child.both class and method are static.then i want when parogrammer use of this method from child level show differenet document .
Change document of parent method in child class
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

zhong chen8 reputationPosted Mar 3, 2010, 4:24 AM EST
{
public static void a()
{
Console.Write("a");
}
}
public class B:A
{
public static new void a()
{
Console.Write("b");
}
}
Kirtan PatelRank #292 · 8.6K reputationPosted Mar 3, 2010, 5:22 AM EST
you need to make Parent Class Method Virtual and then Override it in Class B
class A
{
public virtual void a()
{
Console.WriteLine("I m In Class A");
}
}
class B : A
{
public override void a()
{
Console.WriteLine("I m Overrided in Class B");
}
}
Sam HobbsRank #107 · 20.5K reputationPosted Mar 3, 2010, 9:00 AM EST