Click here to Skip to main content
15,306,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: MDI Parent in C# Pin
BobJanova13-Sep-12 4:31
MemberBobJanova13-Sep-12 4:31 
AnswerRe: MDI Parent in C# Pin
Ingo13-Sep-12 4:15
MemberIngo13-Sep-12 4:15 
AnswerRe: MDI Parent in C# Pin
Pete O'Hanlon13-Sep-12 4:31
mvaPete O'Hanlon13-Sep-12 4:31 
AnswerRe: MDI Parent in C# Pin
BillWoodruff17-Sep-12 6:27
mveBillWoodruff17-Sep-12 6:27 
QuestionBackUp And Restore of SqlServer 2005 using C# Windows Application Pin
NABIN SEN12-Sep-12 19:14
MemberNABIN SEN12-Sep-12 19:14 
AnswerRe: BackUp And Restore of SqlServer 2005 using C# Windows Application Pin
Roger Wright12-Sep-12 20:28
professionalRoger Wright12-Sep-12 20:28 
QuestionFirst real C# program by C++ developer Pin
PapaGeek12-Sep-12 16:27
MemberPapaGeek12-Sep-12 16:27 
AnswerRe: First real C# program by C++ developer Pin
Roger Wright12-Sep-12 20:21
professionalRoger Wright12-Sep-12 20:21 
I know it's probably more complicated than I understand, but to me a dll is just a library of functions that you add to your class with a using statement. In C# I believe you create it as a class library, then use the class member methods in your form or console app to accomplish useful things. Keep in mind, of course, that as a programmer I'm a complete idiot, barely functional, but I do manage to make things I need to have work somehow. I could be giving you bad advice, but it seems to me that you might want to create a class library to hold all the useful functions you use in multiple places, a Windows Form for the user interface, and a "something else" that actually controls all the interactions. The GUI part should really only handle display and input, then pass inputs to something else for handling, and respond to events for things that need to be displayed. Your class library would contain the functions that do all the heavy lifting.

In website development, there's a model called MVC - I don't know if it's applied to desktop apps, but I see no reason not to. I once reviewed a book on the subject, and got a free copy of the book when it was finally published, and I was much impressed by the logic of this approach. Your Model (M) would include the class library with all of the workhorse bits, the View (V) would just accept input and display results, and your Controller (C) would contain the state machine and event handlers that make everything happen. To my thinking, this would save you some work, as the command line version of your app could actually be the Controller, using a constructor that accepts the initial inputs on the command line, instead of being provided by your GUI interface. C# allows multiple constructors, so long as the signature is different for each, IIRC.

Of course, I could be leading you astray, being just a hobbyist who will never be an expert, as the majority of our members are. But that's the way I'd tackle it, then if I was completely wrong I'd come back here and beg for help. If it makes sense to you, give it a try... Good luck, and you might have the beginnings of a good article here. Keep that in mind... Big Grin | :-D
Will Rogers never met me.

GeneralRe: First real C# program by C++ developer Pin
BobJanova12-Sep-12 23:07
MemberBobJanova12-Sep-12 23:07 
GeneralRe: First real C# program by C++ developer Pin
jschell13-Sep-12 8:28
Memberjschell13-Sep-12 8:28 
AnswerRe: First real C# program by C++ developer Pin
V.12-Sep-12 20:30
professionalV.12-Sep-12 20:30 
AnswerRe: First real C# program by C++ developer Pin
Richard MacCutchan12-Sep-12 22:26
mveRichard MacCutchan12-Sep-12 22:26 
AnswerRe: First real C# program by C++ developer Pin
jschell13-Sep-12 8:59
Memberjschell13-Sep-12 8:59 
AnswerRe: First real C# program by C++ developer Pin
wizardzz13-Sep-12 10:46
Memberwizardzz13-Sep-12 10:46 
AnswerRe: First real C# program by C++ developer Pin
Alan Balkany13-Sep-12 11:10
MemberAlan Balkany13-Sep-12 11:10 
AnswerRe: First real C# program by C++ developer Pin
Alan Balkany13-Sep-12 11:44
MemberAlan Balkany13-Sep-12 11:44 
QuestionDynamic TimeSlots Pin
Member 941347212-Sep-12 8:34
MemberMember 941347212-Sep-12 8:34 
AnswerRe: Dynamic TimeSlots Pin
Pete O'Hanlon12-Sep-12 9:46
mvaPete O'Hanlon12-Sep-12 9:46 
QuestionSieve of Eratosthenes Pin
WebMaster12-Sep-12 4:23
MemberWebMaster12-Sep-12 4:23 
AnswerRe: Sieve of Eratosthenes Pin
fjdiewornncalwe12-Sep-12 4:31
professionalfjdiewornncalwe12-Sep-12 4:31 
AnswerRe: Sieve of Eratosthenes Pin
Manfred Rudolf Bihy12-Sep-12 4:36
professionalManfred Rudolf Bihy12-Sep-12 4:36 
GeneralRe: Sieve of Eratosthenes Pin
WebMaster12-Sep-12 4:39
MemberWebMaster12-Sep-12 4:39 
GeneralRe: Sieve of Eratosthenes Pin
Manfred Rudolf Bihy12-Sep-12 4:45
professionalManfred Rudolf Bihy12-Sep-12 4:45 
GeneralRe: Sieve of Eratosthenes Pin
WebMaster12-Sep-12 4:56
MemberWebMaster12-Sep-12 4:56 
GeneralRe: Sieve of Eratosthenes Pin
Manfred Rudolf Bihy12-Sep-12 5:04
professionalManfred Rudolf Bihy12-Sep-12 5:04 

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.