Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why Interface

Posted on 2011-03-23
5
Medium Priority
?
204 Views
Last Modified: 2013-12-17
An abstract class can do all stuff what an interface does . Though Multiple inheritence not possible in abstract class with interface its possible. But why the interface concept came .
0
Comment
Question by:mohantyd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 35196794
0
 
LVL 16

Expert Comment

by:Imran Javed Zia
ID: 35196856
Hi,
It is simple, you can implement multiple Interfaces further more abstract can be only one and must be used as parent.
http://www.codeproject.com/KB/cs/abstractsvsinterfaces.aspx
Thanks
0
 
LVL 10

Expert Comment

by:Mathiyazhagan
ID: 35197141
One more great article from Code Project :
http://www.codeproject.com/KB/architecture/Abstract_Interface.aspx

and have attached PDF of an article (from DigCode, as now the link is not working). Interface-vs.-Abstract-Clas.pdf
Hope this helps.
0
 
LVL 13

Expert Comment

by:Naman Goel
ID: 35197527
Interface is something like a contract between class and Interface, it is like a menu card that facilitates a class that what type of implementation it contains. for example if you implemented IEnumerable outside class or user of class can expect that you had implemented GetEnumerator() method, in similar way if you had implemented IDisposable along with IEnumerable the user of that object can expect Dispose is being implemented in that class, so interface purely facilitates a class to implement multiple features into the class.
0
 
LVL 10

Accepted Solution

by:
khan_webguru earned 1000 total points
ID: 35244597
Hello Bro!

Please find the attached sample code from code project I used once to fix the problem. Hope this will help you.

sample-Code.docx

Regards,

AAK
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question