How would you implement inheritance using VB.NET ?

Questions by NithyaSurendran

Showing Answers 1 - 16 of 16 Answers

Jagtar

  • Nov 2nd, 2006
 

Make a class and also make one more class and 2nd class will implements the first class. It is very simple concepts of inheritance. It has also many other logics.

  Was this answer useful?  Yes

Suma

  • Nov 29th, 2006
 

Inheritance is the ability of a class to derive its characeristics from an existing class.

  Was this answer useful?  Yes

suneetha

  • Dec 18th, 2006
 

Using VB.NET we can create a class that provides basic functionality so that other classes can inherit its members. VB.NET provides the 'Inherits' keyword to implement inheritance. By using the keyword 'Inherits' we can inherit the characteristics of a class into another class.

  Was this answer useful?  Yes

salahuddin

  • Mar 12th, 2007
 

Thanks suneeta for ur answer.. it really helped me... Inherits is the key word to inhert one class into another class of vb.net

  Was this answer useful?  Yes

Key word for inheritance used inherits

example
Class Parent

Public i As Integer = 5

Public Overridable Sub MyMethod()

Console.WriteLine("I am Parent's MyMethod()")

End Sub

End ClassClass

Child

Inherits Parent

Public Overrides Sub MyMethod()

Console.WriteLine("I am Child's MyMethod()")

End Sub

End Class

  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