Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Casting List to IList Pin
Ubirajara Mendes6-Aug-09 8:50
Ubirajara Mendes6-Aug-09 8:50 
Questiondrag n drop images Pin
strife194-Aug-09 7:39
strife194-Aug-09 7:39 
AnswerRe: drag n drop images Pin
Abhijit Jana4-Aug-09 8:08
professionalAbhijit Jana4-Aug-09 8:08 
QuestionFacotry Design Pattern Pin
jpk4204-Aug-09 6:49
jpk4204-Aug-09 6:49 
AnswerRe: Facotry Design Pattern Pin
Abhijit Jana4-Aug-09 6:56
professionalAbhijit Jana4-Aug-09 6:56 
AnswerRe: Facotry Design Pattern Pin
N a v a n e e t h4-Aug-09 7:05
N a v a n e e t h4-Aug-09 7:05 
QuestionUse of Interfaces Pin
jpk4204-Aug-09 6:47
jpk4204-Aug-09 6:47 
AnswerRe: Use of Interfaces Pin
Abhijit Jana4-Aug-09 7:05
professionalAbhijit Jana4-Aug-09 7:05 
jpk420 wrote:
I would like to know when should we decide that we must interface ? why should we use them ?

Inheritance is a good choice when:
1.Your inheritance hierarchy represents an "is-a" relationship and not a "has-a" relationship.

2.You can reuse code from the base classes.

3.You need to apply the same class and methods to different data types.

4.The class hierarchy is reasonably shallow, and other developers are not likely to add many more levels.

5.You want to make global changes to derived classes by changing a base class.

Source : MSDN[^]
When to use Interface[^]
jpk420 wrote:
Kindly give one of real time example where we have used them

How to: Create and Implement Interfaces[^]

Above are the best possible resource that I have provided to you. You should search Google once before asking this type of questions

Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
View My Latest Article

AnswerRe: Use of Interfaces Pin
N a v a n e e t h4-Aug-09 7:18
N a v a n e e t h4-Aug-09 7:18 
AnswerRe: Use of Interfaces Pin
Luc Pattyn4-Aug-09 7:42
sitebuilderLuc Pattyn4-Aug-09 7:42 
Questionquery wizard Pin
mohammad alnoed4-Aug-09 6:46
mohammad alnoed4-Aug-09 6:46 
AnswerRe: query wizard Pin
Abhijit Jana4-Aug-09 7:00
professionalAbhijit Jana4-Aug-09 7:00 
GeneralRe: query wizard Pin
mohammad alnoed4-Aug-09 7:07
mohammad alnoed4-Aug-09 7:07 
GeneralRe: query wizard Pin
Henry Minute4-Aug-09 13:19
Henry Minute4-Aug-09 13:19 
QuestionAsynchronous socket and webrequest Pin
joana.simoes4-Aug-09 6:36
joana.simoes4-Aug-09 6:36 
QuestionFile In Use Problem Pin
eddieangel4-Aug-09 6:03
eddieangel4-Aug-09 6:03 
AnswerRe: File In Use Problem [modified] Pin
Luc Pattyn4-Aug-09 6:08
sitebuilderLuc Pattyn4-Aug-09 6:08 
GeneralRe: File In Use Problem Pin
N a v a n e e t h4-Aug-09 7:23
N a v a n e e t h4-Aug-09 7:23 
GeneralRe: File In Use Problem Pin
Luc Pattyn4-Aug-09 7:29
sitebuilderLuc Pattyn4-Aug-09 7:29 
Questionusing kdtele for c# application Pin
anahita224-Aug-09 5:28
anahita224-Aug-09 5:28 
AnswerRe: using kdtele for c# application Pin
Not Active4-Aug-09 6:18
mentorNot Active4-Aug-09 6:18 
AnswerRe: using kdtele for c# application Pin
N a v a n e e t h4-Aug-09 6:20
N a v a n e e t h4-Aug-09 6:20 
QuestionPassing C# variable to HTML page Pin
VengefulSakhmet4-Aug-09 5:16
VengefulSakhmet4-Aug-09 5:16 
AnswerRe: Passing C# variable to HTML page Pin
Not Active4-Aug-09 6:17
mentorNot Active4-Aug-09 6:17 
GeneralRe: Passing C# variable to HTML page Pin
VengefulSakhmet4-Aug-09 8:33
VengefulSakhmet4-Aug-09 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.