Click here to Skip to main content
15,894,720 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is this good code practice? Pin
PIEBALDconsult1-May-10 19:41
mvePIEBALDconsult1-May-10 19:41 
GeneralRe: Is this good code practice? [modified] Pin
venomation2-May-10 1:49
venomation2-May-10 1:49 
GeneralRe: Is this good code practice? Pin
PIEBALDconsult2-May-10 4:07
mvePIEBALDconsult2-May-10 4:07 
GeneralRe: Is this good code practice? [modified] Pin
venomation2-May-10 5:58
venomation2-May-10 5:58 
GeneralRe: Is this good code practice? Pin
PIEBALDconsult2-May-10 10:24
mvePIEBALDconsult2-May-10 10:24 
GeneralRe: Is this good code practice? Pin
venomation2-May-10 11:41
venomation2-May-10 11:41 
GeneralRe: Is this good code practice? Pin
PIEBALDconsult2-May-10 17:44
mvePIEBALDconsult2-May-10 17:44 
AnswerRe: Is this good code practice? Pin
venomation3-May-10 0:56
venomation3-May-10 0:56 
Thanks again "PIEBALDconsult" you have helped me allot !

I don't feel the need to show the code as its just minor changes but:

1 - I added a IMenu interface which can "Display" so that I can derive new menu's for other situations.

2 - Menu inherits IMenu and I replaced " Menu mainMenu = new Menu(personManager);" with " IMenu mainMenu = new Menu(personManager);" so that I can use different menu's.

3 - I decided to switch the List<t> with an IList<t> so that I can use the "AsReadOnly()" method as I don't need to modify the contents.

4 - For the "Add" method: "if (input != null) ManagedList.Add(input);" looked better for me.

Final thoughts: I could apply the strategy pattern to IMenu so that it encapsulates its behaviour if needed, but this project was to show manageable code, and I think that would make it more complicated and unnecessary Laugh | :laugh:

Thanks again!
GeneralRe: Is this good code practice? Pin
PIEBALDconsult3-May-10 3:59
mvePIEBALDconsult3-May-10 3:59 
GeneralRe: Is this good code practice? Pin
Alaric_3-May-10 4:45
professionalAlaric_3-May-10 4:45 
GeneralRe: Is this good code practice? Pin
venomation3-May-10 5:04
venomation3-May-10 5:04 
QuestionCreate Image in WinForms vs Asp.net Pin
#realJSOP30-Apr-10 9:44
mve#realJSOP30-Apr-10 9:44 
AnswerRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn30-Apr-10 10:04
sitebuilderLuc Pattyn30-Apr-10 10:04 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP30-Apr-10 11:35
mve#realJSOP30-Apr-10 11:35 
GeneralRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn30-Apr-10 11:41
sitebuilderLuc Pattyn30-Apr-10 11:41 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP30-Apr-10 12:04
mve#realJSOP30-Apr-10 12:04 
GeneralRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn30-Apr-10 12:30
sitebuilderLuc Pattyn30-Apr-10 12:30 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP30-Apr-10 23:10
mve#realJSOP30-Apr-10 23:10 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP1-May-10 3:07
mve#realJSOP1-May-10 3:07 
GeneralRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn1-May-10 3:32
sitebuilderLuc Pattyn1-May-10 3:32 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP1-May-10 7:35
mve#realJSOP1-May-10 7:35 
GeneralRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn1-May-10 8:19
sitebuilderLuc Pattyn1-May-10 8:19 
GeneralRe: Create Image in WinForms vs Asp.net Pin
#realJSOP1-May-10 8:47
mve#realJSOP1-May-10 8:47 
GeneralRe: Create Image in WinForms vs Asp.net [modified] Pin
#realJSOP1-May-10 9:10
mve#realJSOP1-May-10 9:10 
GeneralRe: Create Image in WinForms vs Asp.net Pin
Luc Pattyn1-May-10 9:48
sitebuilderLuc Pattyn1-May-10 9:48 

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.