How can inheritance is achieved in vb.net?, DOT NET Programming

How inheritance is achieved in VB.NET?

The Inheritance is achieved by using "Inherits" keyword in the VB.NET (& For C# it is ":"). Easy Sample is provided in CD for understanding inheritance in the folder "WindowsApplicationInheritance". There are 2 classes one is the parent "ClsParent" and second is the child "ClsChild". The Parent class has a string which has to parsed for junk data "@" and "/".ClsParent has the functionality which parses only cleans up "@"."ClsChild" then inherits from parent and adds some extra functionality by parsing "/".

Public Class ClsParent

 Protected strData As String = "jksdhkj@dadad///ajkdhsjakd"

 Public Function Parse() As String

 Dim PstrData As String

 PstrData = strData PstrData = Replace(PstrData, "@", "")

Return PstrData

 End Function

 Public Function GetActualString() As String

 Return strData

End Function

End Class

Public Class ClsChild

 Inherits ClsParent

 ' this is child and a special parse function is added which will also parse "/"

Public Function ParseBackSlash()

Dim PstrData As String

PstrData = Me.Parse()

PstrData = Replace(PstrData, "/", "")

Return PstrData End Function

 End Class

 Above is the source code for "ClsChild" which does the remaining work. It adds extra functionality by parsing "/" junk character's of the data.

25_interface in action.png

Figure:-Inheritance in action

Posted Date: 9/21/2012 8:53:39 AM | Location : United States







Related Discussions:- How can inheritance is achieved in vb.net?, Assignment Help, Ask Question on How can inheritance is achieved in vb.net?, Get Answer, Expert's Help, How can inheritance is achieved in vb.net? Discussions

Write discussion on How can inheritance is achieved in vb.net?
Your posts are moderated
Related Questions
How can you make a simple harmonic motion in visual basic 2010 where you will ask an input to the user and your output will be a moving pendulum and a graph. Also the displacement

I am looking individuals who have industry experience working on Microsoft Technology and Jquery ( MVC 4.5 ), who will take live online session and give training through Team Viewe

I want Text/Image printing Counter Project Description: Need your help in our C# programming project. We need to pass this project in two weeks starting from now to pass our

Reading strings from the keyboard   using System; class Prog3_1 {       public static void Main()   {    Console.Write ("Enter Your First Name : "); // Displaying to writ

What are the different types of triggers in SQl There are 2 types of triggers in the SQL server 2000 :- 1) INSTEAD OF triggers: The INSTEAD OF triggers fire in place of

Need Experienced dot Net and PHP Programmers Project Description: Need Experienced dot Net., JSP, PHP, Java Programmers Skilled professional and command in Programming eit

We have a web based program completed with .NET C# and Microsoft SQL Server. There are some reports requires to be created. Required Skills. - High Proficiency in .NET C#

What is CAR (Causal Analysis and Resolution)? The basic purpose of the CAR is to analyze all the problems, defects, and good practices/positive triggers in projects, perform a

help me to prepare the above charts for my online vegetable selling project

Project Description: I need a simple app developed using C# or PHP which will talk to Tally ERP 9 using XML over HTTP. Only those who are well versed with Tally ERP 9 and its