Click here to Skip to main content
15,891,204 members
Home / Discussions / C#
   

C#

 
AnswerRe: Application Settings Pin
Midnight Ahri22-Jul-13 23:47
Midnight Ahri22-Jul-13 23:47 
GeneralRe: Application Settings Pin
Eddy Vluggen23-Jul-13 0:29
professionalEddy Vluggen23-Jul-13 0:29 
QuestionResponsive UI - WPF with Properties Pin
SynergiAios22-Jul-13 15:09
SynergiAios22-Jul-13 15:09 
AnswerRe: Responsive UI - WPF with Properties Pin
Dave Kreskowiak22-Jul-13 16:32
mveDave Kreskowiak22-Jul-13 16:32 
GeneralRe: Responsive UI - WPF with Properties Pin
SynergiAios23-Jul-13 0:18
SynergiAios23-Jul-13 0:18 
QuestionOO Design for Specifc Problem Pin
KeithF22-Jul-13 6:17
KeithF22-Jul-13 6:17 
AnswerRe: OO Design for Specifc Problem Pin
KeithF22-Jul-13 21:41
KeithF22-Jul-13 21:41 
AnswerRe: OO Design for Specifc Problem Pin
Eddy Vluggen23-Jul-13 0:30
professionalEddy Vluggen23-Jul-13 0:30 
KeithF wrote:
Am i correct in saying this?

Yes.

You'd want an (abstract) base-class that defines the Process method;
C#
public abstract bool Process(BaseProcessArgs args)
{
The factory would return a class that derives from this abstract base-class, with each class having it's own implementation for the Process method. The app would only have to call the method, without knowing specific details on the class.

Varying the parameters can be done in a similar way; EventArgs is a nice example on how to vary parameters, and still have some control. Imagine a base-class for the arguments, called "BaseProcessArgs"; if you'd need to pass a string and an int, your "Args" class would look like below;
C#
class TestArgs: BaseProcessArgs
{
  public string TestString { get; set; }
  public int TestInt { get; set; }
}
Alternatively, if only types will change, you might want to consider a generic class.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: OO Design for Specifc Problem Pin
KeithF30-Jul-13 22:49
KeithF30-Jul-13 22:49 
QuestionMicrosoft Expression Encoder with IIS Live Smooth Streaming Issue Pin
Member 1003572121-Jul-13 21:46
Member 1003572121-Jul-13 21:46 
AnswerRe: Microsoft Expression Encoder with IIS Live Smooth Streaming Issue Pin
Dave Kreskowiak22-Jul-13 1:46
mveDave Kreskowiak22-Jul-13 1:46 
QuestionGetGuiThreadInfo can not get the caret's position Pin
goldli8820-Jul-13 23:12
goldli8820-Jul-13 23:12 
QuestionHow to Create Dynamic Buttons With Students Roll No. on It From Database Pin
jackspero1820-Jul-13 1:38
jackspero1820-Jul-13 1:38 
AnswerRe: How to Create Dynamic Buttons With Students Roll No. on It From Database Pin
Garth J Lancaster20-Jul-13 2:05
professionalGarth J Lancaster20-Jul-13 2:05 
QuestionC# unmanage DLL export Pin
hijeenu19-Jul-13 10:32
hijeenu19-Jul-13 10:32 
QuestionUpdate Shorthand? Pin
eddieangel19-Jul-13 8:37
eddieangel19-Jul-13 8:37 
AnswerRe: Update Shorthand? Pin
Dave Kreskowiak19-Jul-13 9:50
mveDave Kreskowiak19-Jul-13 9:50 
AnswerRe: Update Shorthand? Pin
Abhinav S19-Jul-13 18:48
Abhinav S19-Jul-13 18:48 
AnswerRe: Update Shorthand? Pin
Jean A Brandelero22-Jul-13 3:59
Jean A Brandelero22-Jul-13 3:59 
QuestionCalling VB 6 OCX from C# EXE Pin
matinon2219-Jul-13 2:18
matinon2219-Jul-13 2:18 
AnswerRe: Calling VB 6 OCX from C# EXE Pin
Dave Kreskowiak19-Jul-13 2:21
mveDave Kreskowiak19-Jul-13 2:21 
GeneralRe: Calling VB 6 OCX from C# EXE Pin
matinon2223-Jul-13 22:18
matinon2223-Jul-13 22:18 
GeneralRe: Calling VB 6 OCX from C# EXE Pin
Dave Kreskowiak24-Jul-13 3:52
mveDave Kreskowiak24-Jul-13 3:52 
QuestionGeneric collections Pin
PozzaVecia19-Jul-13 0:09
PozzaVecia19-Jul-13 0:09 
AnswerRe: Generic collections Pin
Nicholas Marty19-Jul-13 0:41
professionalNicholas Marty19-Jul-13 0:41 

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.