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?

Explain assemblies, Explain assemblies An assembly is a single deployab...

Explain assemblies An assembly is a single deployable unit that having all the information about the implementation of : - classes - structures and - interfaces An

Need to develop a simple .net software, Need to develop a simple .net softw...

Need to develop a simple .net software I am seeking someone who can design a customized software for me, prefrebly in .NET. I have a sql server backend which i would like to use

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

I need support on .net c# automation testing, Project Description: I nee...

Project Description: I need support on .net c# automation testing Additional Project Description: Project is on Visual Studio, creating Automation and TFS Test development

I need a custom report - crystal reports, I need a Custom Report - Crystal ...

I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

Benefits and limitations of using hidden frames, What are benefits and limi...

What are benefits and limitations of using Hidden frames 1)    The benefits of using hidden frames are as follows: 2)    More than one data field can cache. 3)    The abi

Difference between class and structure, What is the difference between Clas...

What is the difference between Class and structure's? The main differences between them are as follows:- 1) The Structure is value types while classes are referen

Asp .net mvc tutor, ASP .NET MVC Tutor Project Description: Work with...

ASP .NET MVC Tutor Project Description: Work with me and assist with troubleshooting lessons, describe in easy to understand terms how to accomplish certain tasks, provide co

Produce a server setup where i have access to ip address, Produce a server ...

Produce a server setup where I have access to ip address Project Description: I would require using ftp or remote desktop to put software on your server (must be a united sta

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