How do you inherit from a class in C#?

Place a colon and then the name of the base class. Notice that it's double colon in C++.

Showing Answers 1 - 2 of 2 Answers

nitin

  • Dec 11th, 2006
 

Lets us say there are 2 claases ,Class A and ClassB.

ClassA -BaseClass,ClassB-derived class

ClassA

{

}

ClassB:ClassA(baseclass)

{

}

here we can say ClassB is derived from classA.

Hope this is right.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions