Click here to Skip to main content
15,890,506 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: C# teamwork coding style Pin
Eddy Vluggen7-Jan-14 9:27
professionalEddy Vluggen7-Jan-14 9:27 
GeneralRe: C# teamwork coding style Pin
comiscience7-Jan-14 20:41
comiscience7-Jan-14 20:41 
AnswerRe: C# teamwork coding style Pin
Pete O'Hanlon7-Jan-14 22:46
mvePete O'Hanlon7-Jan-14 22:46 
GeneralRe: C# teamwork coding style Pin
comiscience7-Jan-14 23:02
comiscience7-Jan-14 23:02 
QuestionBase class method access VS. abstract class Method access Pin
netfed4-Jan-14 22:28
netfed4-Jan-14 22:28 
AnswerRe: Base class method access VS. abstract class Method access Pin
Kornfeld Eliyahu Peter5-Jan-14 2:14
professionalKornfeld Eliyahu Peter5-Jan-14 2:14 
GeneralRe: Base class method access VS. abstract class Method access Pin
netfed5-Jan-14 3:01
netfed5-Jan-14 3:01 
AnswerRe: Base class method access VS. abstract class Method access Pin
Kornfeld Eliyahu Peter5-Jan-14 3:17
professionalKornfeld Eliyahu Peter5-Jan-14 3:17 
It get me back exactly to the same point...
netfed wrote:

C#
public virtual void GetInfo()
{
  Console.WriteLine("Name1: {0}", name1);
  Console.WriteLine("SSN1: {0}", ssn1);
}


This code is common to all classes based on animal1, you never write it again.
In the abstract version you have an empty GetInfo method (it's abstract so it must be empty!), and in every instance inherits this abstract class you must implement Name and SSN...

You see base classes used when you have a certain amount of common functionality that known. Abstract class are more like interfaces as they declare the structure of the class inherits them, with the addition of some common functionality...

Again - based on your sample base class is better for you...
AnswerRe: Base class method access VS. abstract class Method access Pin
Shameel6-Jan-14 3:53
professionalShameel6-Jan-14 3:53 
GeneralRe: Base class method access VS. abstract class Method access Pin
netfed9-Jan-14 2:49
netfed9-Jan-14 2:49 
GeneralRe: Base class method access VS. abstract class Method access Pin
Richard MacCutchan9-Jan-14 4:43
mveRichard MacCutchan9-Jan-14 4:43 
AnswerRe: Base class method access VS. abstract class Method access Pin
Shameel10-Jan-14 3:36
professionalShameel10-Jan-14 3:36 
GeneralRe: Base class method access VS. abstract class Method access Pin
netfed12-Jan-14 0:51
netfed12-Jan-14 0:51 
GeneralRe: Base class method access VS. abstract class Method access Pin
Ron Beyer12-Jan-14 4:33
professionalRon Beyer12-Jan-14 4:33 
GeneralRe: Base class method access VS. abstract class Method access Pin
netfed12-Jan-14 6:17
netfed12-Jan-14 6:17 
GeneralRe: Base class method access VS. abstract class Method access Pin
Ron Beyer12-Jan-14 6:40
professionalRon Beyer12-Jan-14 6:40 
GeneralRe: Base class method access VS. abstract class Method access Pin
Shameel12-Jan-14 4:54
professionalShameel12-Jan-14 4:54 
AnswerRe: Base class method access VS. abstract class Method access Pin
Keld Ølykke9-Jan-14 14:33
Keld Ølykke9-Jan-14 14:33 
GeneralRe: Base class method access VS. abstract class Method access Pin
netfed12-Jan-14 1:16
netfed12-Jan-14 1:16 
GeneralRe: Base class method access VS. abstract class Method access Pin
Keld Ølykke12-Jan-14 8:06
Keld Ølykke12-Jan-14 8:06 
QuestionImplementation of Loose Coupling Pattern Pin
User 905247816-Dec-13 14:41
User 905247816-Dec-13 14:41 
AnswerRe: Implementation of Loose Coupling Pattern Pin
Antonio Ripa27-Dec-13 2:25
professionalAntonio Ripa27-Dec-13 2:25 
GeneralRe: Implementation of Loose Coupling Pattern Pin
jschell27-Dec-13 12:57
jschell27-Dec-13 12:57 
GeneralRe: Implementation of Loose Coupling Pattern Pin
Kornfeld Eliyahu Peter4-Jan-14 23:13
professionalKornfeld Eliyahu Peter4-Jan-14 23:13 
AnswerRe: Implementation of Loose Coupling Pattern Pin
Keld Ølykke1-Jan-14 10:02
Keld Ølykke1-Jan-14 10:02 

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.