What is CrazyEngico.com (CE)?

CrazyEngico (CE) is a one-stop solution for interview questions and answers, domain knowledge, e-learning, tutorials, articles and many more learning material.
e-learning - Intelligent e-learning tutorials and articles
Domain Knowledge Learn about various business domains/verticals such as Banking, Financial, Insurance, Healthcare and many more...
Interview Questions and Answers - Post your questions and answers. 1000+ database of ready questions and answers available to prepare for an interview.
Tutorials - 300+ video tutorials from beginner to expert level.
Articles - 300+ technical articles to understand concepts.
Forum - A technical forum to post your queries/responses.

Search Questions

Interview Questions/Answers

Ads
Question
Interview Q & A >> C# >> What are Interfaces?

<< Previous Question Navigator Next >>

0        0
What are Interfaces? (Views: 1724)


Answers

2        0

C# provides an alternate approach known as interface to support the concept of multiple inheritance. Although a C# class cannot be a subclass of more than one superclass, it can implement more than one interface, thereby enabling us to create classes that build upon other classes without the problems created by multiple inheritance.
An interface in C# is a reference type. It is basically a kind of class with some differences. Major differences include:
- All the members of an interface are implicitly public and abstract.
- An interface cannot contain constant fields, constructors and destructors.
- Its members cannot be declared static.
- Since the methods in an interface are abstract, they do not include implementation code.
- An interface can inherit multiple interfaces.
An interface can contain one or more methods, properties, indexers and events but none of them are implemented in the interface itself. It is the responsibility of the class that implements the interface to define the code for implementation of these members.

Submitted By: Anonymous | Created On: 5/16/2009 4:41:07 PM



Post your Answer
Your answer will be first reviewed by our administrator before it appears on the site.

Your Answer:


 
Display Name:





By clicking on Submit button you agree to the Terms of Service agreement.




Copyright © 2018 CrazyEngico.com. All rights reserved.
CrazyEngico.com is not responsible for the content and CrazyEngico.com does not evaluate or guarantee the accuracy of any CrazyEngico.com content.
Please read our terms of service agreement before using this site.

feedback