Dot Net Programming Unit III
Dot Net Programming Unit III
Unit III
Class A
Public _value As Integer
Public Sub Display()
Console.WriteLine(_value)
End Sub
End Class
Class B : Inherits A
Public Sub New(ByVal value As
Integer)
MyBase._value = value
End Sub
End Class
Module Module1
Sub Main()
Dim b As B = New B(5)
b.Display()
End Sub
End Module
Inheritance :
Inheritance can be defined as the
process where one class acquires
the properties (methods and
fields) of another.
Polymorphism :
Polymorphism is the ability of an
object to take on many forms.
The most common use of
polymorphism in OOP occurs
Step 4
Now drag and drop a
TreeViewControl from the ToolBox.
Step 5
Write the code inside the
<Nodes> </Nodes> element and
create Nodes of the TreeViewin
the "TreeView.aspx.
Step 6
Now run the code and see the
following output:
(the default is 16 x
it
it
SIMILAR QUESTIONS
Describe constructor with an example
Discuss Access modifiers with an example
code
What is meant by polymorphism? Explain
the two ways to handle polymorphism in VB
Explain Polymorphism with an example
How do you handle Graphics in VB? Explain
in brief
Explain about Graphics methods
SIMILAR QUESTIONS
What is an Interface and how to create an
Interface
Explain Interface
What is the difference between Stream
Writer and Binary Writer? Explain