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

Assignment Help:

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


Related Discussions:- How can inheritance is achieved in vb.net?

Windowsapplications., what is the code for calculator in windowsapplication...

what is the code for calculator in windowsapplication

Difference between asp and asp.net, The ASP.NET new feature supports are sh...

The ASP.NET new feature supports are shown below :- Better Language Support 1) The New ADO.NET Concepts have been implemented. 2) The ASP.NET supports complete  language

Web based program completed with .net, We have a web based program complete...

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#

Define passport authentication, Passport Authentication This is a centr...

Passport Authentication This is a centralized authentication service given by Microsoft that offers a single logon facility and membership services for participating sites. ASP

To know a state of a thread, How can we know a state of a thread? The "...

How can we know a state of a thread? The "ThreadState" property is used to get complete detail of a thread. The Thread can have one or a combination of status.System.Threading.

Show the structure of the global.asax file, Question: (a) Write extrac...

Question: (a) Write extract codes to show the structure of the Global.asax file. (b) Outline four classes that allow you to work with File Streams. (c) When working with

Bug correction and prediction, Bug Correction and Prediction Project Des...

Bug Correction and Prediction Project Description: The project is about the prediction of bugs and resolves the bug in the sample program using costriage algorithm. You have

What is the use of the connection object, What is the use of the Connection...

What is the use of the Connection object? The Connection object is used to connect your application to a specific data source by giving the needed authentication information in

Difference between "dataset" and "datareader", What is the difference betwe...

What is the difference between "DataSet" and "DataReader"? The major differences between "DataSet" and "DataReader" are as follows:- 1)The "DataSet" is a disconnected archit

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd