How would you implement inheritance using VB.NET/C#?
Answers were Sorted based on User's Feedback
Answer / raghumadhav tirunagari
Derived Class : Basecalss
VB.NEt : Derived Class Inherits Baseclass
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rajender chauhan
C# : Class A:B
VB.Net Class A Inherits B
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
What is CSS? What is the advantage os using CSS in ASP.NET Web Applications?
What is web.config. How many web.config files can be allowed to use in an application?
6 Answers Accenture, HCL, InterGraph, iSoft,
How do you validate the controls in an ASP .NET page?
What are httphandlers and httpmodules and difference between them?
To call a Web service which transport protocol you can use?
which one is faster execute reader, scalar, execute non query ?
Why do we need asp.net?
What are themes and skins in 2.0, explain usage scenario?
What is difference between cookies and cache?
A Web Service Can Only Be Written In .net. Is it True??
a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?
What is data caching?