Click here to Skip to main content
15,912,837 members
Home / Discussions / C#
   

C#

 
AnswerRe: Abstract And Interface Pin
Vikram A Punathambekar6-Apr-09 21:29
Vikram A Punathambekar6-Apr-09 21:29 
AnswerRe: Abstract And Interface Pin
Mbah Dhaim6-Apr-09 21:41
Mbah Dhaim6-Apr-09 21:41 
Sharma Dinesh Kumar wrote:
When We Have To Use Abstract Class Or When Interface


sorry for my bad English

- use abstract when you want to design code that only in serial derivation objects
- use interface when you want to design code that can be implemented in parallel derivation objects

sample for using abstract object
public abstract class A(){...}
public abstract class B(){...}
//this class will get the published attribute from class A
class DA : A{...}
//this class will get the published attribute from class B
class DB : B{...}
//below this cannot be applied
//class AB : A,B{...}


you can compare to this sample of using interface
public interface IA{...}
public interface IB{...}
//this class will get the published attribute from interface IA
class A : IA{...}
//this class will get the published attribute from interface IB
class B : IB{...}
//this class will get the published attribute from both interface IA and IB, this is the difference implementation from abstract
class AB : IA, IB {...}


there are plenty resources from net, try search in Google with keywords "OOP in C#"
hope it helps

dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support



AnswerRe: Abstract And Interface Pin
DaveyM696-Apr-09 22:46
professionalDaveyM696-Apr-09 22:46 
QuestionNeed help Licensed Windows Forms Controls in Internet Explorer Pin
Member 47160876-Apr-09 20:34
Member 47160876-Apr-09 20:34 
AnswerRe: Need help Licensed Windows Forms Controls in Internet Explorer Pin
Member 47160877-Apr-09 14:14
Member 47160877-Apr-09 14:14 
Questionexcel to listbox Pin
mist_psycho6-Apr-09 20:19
mist_psycho6-Apr-09 20:19 
AnswerRe: excel to listbox Pin
Christian Graus6-Apr-09 20:24
protectorChristian Graus6-Apr-09 20:24 
GeneralRe: excel to listbox Pin
mist_psycho6-Apr-09 20:30
mist_psycho6-Apr-09 20:30 
GeneralRe: excel to listbox Pin
Christian Graus6-Apr-09 21:42
protectorChristian Graus6-Apr-09 21:42 
AnswerRe: excel to listbox Pin
Giorgi Dalakishvili6-Apr-09 20:31
mentorGiorgi Dalakishvili6-Apr-09 20:31 
GeneralRe: excel to listbox Pin
mist_psycho6-Apr-09 20:34
mist_psycho6-Apr-09 20:34 
GeneralRe: excel to listbox Pin
Christian Graus6-Apr-09 21:43
protectorChristian Graus6-Apr-09 21:43 
AnswerRe: excel to listbox Pin
Laddie7-Apr-09 1:00
Laddie7-Apr-09 1:00 
QuestionSequential structure code Pin
BabyOreo6-Apr-09 18:55
BabyOreo6-Apr-09 18:55 
AnswerRe: Sequential structure code Pin
N a v a n e e t h6-Apr-09 19:54
N a v a n e e t h6-Apr-09 19:54 
AnswerRe: Sequential structure code Pin
Christian Graus6-Apr-09 19:58
protectorChristian Graus6-Apr-09 19:58 
GeneralRe: Sequential structure code Pin
CPallini6-Apr-09 21:08
mveCPallini6-Apr-09 21:08 
GeneralRe: Sequential structure code Pin
BabyOreo6-Apr-09 21:26
BabyOreo6-Apr-09 21:26 
AnswerRe: Sequential structure code Pin
DaveyM697-Apr-09 0:42
professionalDaveyM697-Apr-09 0:42 
QuestionInput data to label through textbox Pin
ciqing6-Apr-09 17:46
ciqing6-Apr-09 17:46 
AnswerRe: Input data to label through textbox Pin
Luc Pattyn6-Apr-09 17:52
sitebuilderLuc Pattyn6-Apr-09 17:52 
GeneralRe: Input data to label through textbox Pin
ciqing6-Apr-09 19:30
ciqing6-Apr-09 19:30 
GeneralRe: Input data to label through textbox Pin
Christian Graus6-Apr-09 20:01
protectorChristian Graus6-Apr-09 20:01 
GeneralRe: Input data to label through textbox Pin
ciqing6-Apr-09 20:37
ciqing6-Apr-09 20:37 
GeneralRe: Input data to label through textbox Pin
Luc Pattyn7-Apr-09 3:00
sitebuilderLuc Pattyn7-Apr-09 3:00 

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.