Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How would you implement inheritance using VB.NET/C#?

Answer Posted / mr vinod kumar

When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class ? including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors. Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged. In VB.NET we can use implements keyword for inheritance, while in C# we can use the sign ( :: ) between subclass and baseclass.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the contents of cookie?

1106


How can we communicate with each server in N-tier Architecture? and what are the methods?

2241


Explain how asp.net page works?

1023


What is the difference between session and viewstate in asp.net?

1119


Why session management is required?

1013


Explain the difference between the web config and machine config.

1036


Describe how passport authentication works.

1128


What is the difference between a multi-layer and multi-tier applications?

1021


If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?

1004


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

2920


What is razor? : asp.net mvc

1041


What are the various types of validation controls provided by asp.net?

982


Describe Segmentation With Paging?

1070


What are the main differences between asp and asp.net?

1053


What is difference between asp.net and asp?

1048