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?

I need chatting application, I need Beautiful Chatting Application Proje...

I need Beautiful Chatting Application Project Description: I need a beautiful chatting application created that has both private as well as public chat system. The chatting c

List the new features added in .net framework 4.0, List the new features ad...

List the new features added in .NET Framework 4.0. The following are the latest features of .NET Framework 4.0:     Improved Application Compatibility and Deployment Support

I have a website with a photo gallery, I have a website with a photo galler...

I have a website with a photo gallery using PhotoHandler -photohandler.codeplex.com I require the code added/ modified to display the image file names under the preview or thumbnai

Explain differences between datagrid and repeater, Differences between Data...

Differences between Datagrid, Datalist and Repeater?   1. Datagrid has paging whereas Datalist doesnt. 2. Datalist has a property called repeat. Direction = vertical/horizon

Explain how the server control validation controls works, Briefly explain h...

Briefly explain how the server control validation controls work? A validation control works by evaluating the value of an input server control on the page to see whether it mee

Asp.net 2.0 application port to asp.net mvc, ASP.NET 2.0 application port t...

ASP.NET 2.0 application port to ASP.NET MVC Project Description: Legacy ASP.NET application for managing tasks for a private client needs a complete re-write. The applicat

What is machine.config, What is Machine.config?  Machine configuration ...

What is Machine.config?  Machine configuration file: The machine. config file have settings that apply to the entire computer. This file is located in the %runtime install path

I would like to develop a new website, I would like to develop a new websit...

I would like to develop a new website to compete with an existing one: greatandhra I would like the new website to be less flashy, more content driven and be inspired from below

Very very boards, Very, Very Boards does a big business in shirts, especial...

Very, Very Boards does a big business in shirts, especially for groups and teams. They need a project that will calculate the price for individual orders, as well as a summary for

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