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?

Best practice while implement globalization & localization, What are the be...

What are the best practices while implementing globalization and localization? The best methods while developing international language support software are shown below:- 1)

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

what is the code for calculator in windowsapplication

Create a windows application which contain display area, Requirements: ...

Requirements: 1.  Complete the following two exercises by developing working csharp projects. 2.  Write a report to explain csharp code written in the projects. 3.  Submi

I want licensing system, Project Description: I'm presently seeking at l...

Project Description: I'm presently seeking at least one more coder that will help me out manage all my concepts and in that way we will share each other's experience and make te

Develop mobile web app, Project Description: This project uses Microsoft...

Project Description: This project uses Microsoft Visual Studio 2010/2012, Internet Information Services (IIS) Manager and Microsoft SQL Server Management Studio. It is a Mobi

Simple Harmonic Motion, How can you make a simple harmonic motion in visual...

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

Why the javascript validation not run on the asp.net, Why The JavaScript Va...

Why The JavaScript Validation Not Run on the Asp.Net? The Asp.Net Button Is post backed on the server & not yet Submit & when It goes to the server its states is lost so if we

Major events in global.asax file, What are major events in GLOBAL.ASAX file...

What are major events in GLOBAL.ASAX file? The Global.asax file, which is derived from the HttpApplication class, maintains a pool of the HttpApplication objects, & assigns the

What are the criteria necessary for an effective network, What are the crit...

What are the criteria necessary for an effective and efficient network? a. Performance It can be measured in several ways, including transmit time and response time. b

What is delay signing, Delay signing During the development process you...

Delay signing During the development process you  need strong keys name  to be exposed to the developer which is not a good practice from security aspect .In such situations yo

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