Click here to Skip to main content
15,399,197 members
Home / Discussions / C#
   

C#

 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Keith Barrow8-Mar-13 4:30
professionalKeith Barrow8-Mar-13 4:30 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 4:40
MemberKrishna Varadharajan8-Mar-13 4:40 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Keith Barrow8-Mar-13 4:49
professionalKeith Barrow8-Mar-13 4:49 
AnswerRe: When to use & when not to use ( Abstract Class & Interface ) Pin
GuyThiebaut8-Mar-13 2:40
professionalGuyThiebaut8-Mar-13 2:40 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 3:04
MemberKrishna Varadharajan8-Mar-13 3:04 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
GuyThiebaut8-Mar-13 3:28
professionalGuyThiebaut8-Mar-13 3:28 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 3:57
MemberKrishna Varadharajan8-Mar-13 3:57 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
GuyThiebaut8-Mar-13 4:16
professionalGuyThiebaut8-Mar-13 4:16 
Hi Krishna,

Please just call me Guy as Mr Guy is too formal for the codeproject Wink | ;)

An abstract class does not need to implement an interface.

An abstract class must be inherited as you cannot create an instance of an abstract class - think of an abstract class as something like a Feline, in Keith's excellent illustration, which is a concept and for which there is no such concrete existence.
However there are tigers which are Feline and are very much concrete - so a tiger inherits from the abstract class of Feline.

You can just create an abstract class and then inherit from that class to create your instances(without implementing an interface).

An abstract class allows you to implement some very general methods such as the LookAround method in Keith's illustration which will not need to be overridden.
Abstract classes are a means of writing less code and implementing polymorphism.
“That which can be asserted without evidence, can be dismissed without evidence.”

― Christopher Hitchens

GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 4:57
MemberKrishna Varadharajan8-Mar-13 4:57 
AnswerRe: When to use & when not to use ( Abstract Class & Interface ) Pin
PIEBALDconsult8-Mar-13 3:42
professionalPIEBALDconsult8-Mar-13 3:42 
AnswerRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Shameel8-Mar-13 4:08
professionalShameel8-Mar-13 4:08 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 4:33
MemberKrishna Varadharajan8-Mar-13 4:33 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Shameel8-Mar-13 5:01
professionalShameel8-Mar-13 5:01 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 5:53
MemberKrishna Varadharajan8-Mar-13 5:53 
AnswerRe: When to use & when not to use ( Abstract Class & Interface ) Pin
jschell8-Mar-13 12:41
Memberjschell8-Mar-13 12:41 
QuestionWhy SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 1:50
MemberKrishna Varadharajan8-Mar-13 1:50 
AnswerRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 3:01
professionalEddy Vluggen8-Mar-13 3:01 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 3:22
MemberKrishna Varadharajan8-Mar-13 3:22 
GeneralRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 4:59
professionalEddy Vluggen8-Mar-13 4:59 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 5:55
MemberKrishna Varadharajan8-Mar-13 5:55 
GeneralRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 7:12
professionalEddy Vluggen8-Mar-13 7:12 
AnswerRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 3:38
professionalPIEBALDconsult8-Mar-13 3:38 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 3:59
MemberKrishna Varadharajan8-Mar-13 3:59 
GeneralRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 5:42
professionalPIEBALDconsult8-Mar-13 5:42 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 5:56
MemberKrishna Varadharajan8-Mar-13 5:56 

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.