.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Advantages of Inheritance

Posted By :Karthikeyan Anbarasan     Posted Date :July 31, 2011    Points :40   Category :.NET Framework 
· Once a behavior (method) or property is defined in a super class(base class),that behavior or property is automatically inherited by all subclasses (derived class).

· Code reusability increased through inheritance.

· Inheritance provide a clear model structure which is easy to understand without much complexity Using inheritance, classes become grouped together in a hierarchical tree structure Code are easy to manage and divided into parent and child classes.


You can also find related Interview Question to Advantages of Inheritance  below: 

Does C# support multiple inheritance?

  
No

C# does not support multiple inheritance. A class can inherit from maximum one base class, although it can implement any number of interfaces. Like Java, C# does not support multiple inheritance, meaning that classes cannot inherit from more than one class (More...)

Advantages of DBMS?

  
1.Redundancy is controlled.
2.Unauthorised access is restricted.
3.Providing multiple user interfaces.
4.Enforcing integrity constraints.
5.Providing backup and recovery. (More...)

What is difference between interface inheritance and class inheritance?

  
We can only inherit from one class but multiple interfaces. In addition, an interface does not contain any implementation it just contains a series of signatures. (More...)

Advantages of Crystal Reports ?

  
Advantages of Crystal Reports :
-------------------------------

Some of the major advantages of using Crystal Reports are:

1. Rapid report development since the designer interface would ease the coding work for the programmer.

2. Can extend it to complicated reports with interactive charts and enhance the understanding of the business model

3. Exposes a report object model, can interact with other controls on the ASP.NET Web form

4. Can programmatically export the reports into widely used formats like .pdf, .doc, .xls, .html and .rtf (More...)

What is inheritance and when would you use inheritance?

  
The concept of child class inheriting the behavior of the parent is called inheritance.

If there are many classes in an application that have some part of their behavior common among all , inheritance would be used. (More...)

Can you explain what inheritance is and an example of when you might use it?

  
Inheritance is a fundamental feature of an object oriented system and it is simply the ability to inherit data and functionality from a parent object. Rather than developing new objects from scratch, new code can be based on the work of other programmers, adding only new features that are needed. (More...)

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

  
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. (More...)

Advantages of LAN?

  
1. Improves productivity due to faster work
2. Provides easy maintenance
3. New systems can be installed and configured easily (More...)

Advantages of Hybrid Topology?

  
1. Used for creating larger networks.

2. Handles large volume of traffic.

3. Fault detection is easy. (More...)

Token Ring - IV Advantages?

  
Advantages:
Data collision does not occur
Every station is allowed to transmit data
Time required to carry the amount of data can be calculated
Minimum cable requirement (More...)

Token Ring - IV Advantages?

  
Disadvantages:
System collapses if links between nodes are malfunctioning
No alternative link to transmit the data
Data transmission is through single direction
Performance degrades when junk data is transmitted (More...)

can we impliment multiple inheritance by using interfaces in C#.net?

  
yes we can implement:

Inheritance Usage Example:
Here is a syntax example for using Implementation Inheritance.


Class derivedClass:baseClass
{
}

derivedClass is derived from baseClass.

Interface Inheritance example:
private Class derivedClass:baseClass , InterfaceX , InterfaceY ....
{
}

(More...)

Advantages of LINQ

  
LINQ queries offer three main advantages over traditional foreach loops:

1)They are more concise and readable, especially when filtering multiple conditions.

2)They provide powerful filtering, ordering, and grouping capabilities with a minimum of application code.

3)They can be ported to other data sources with little or no modification.

(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend