Click here to Skip to main content
15,914,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: get relative path Pin
Dave Kreskowiak15-Feb-11 15:21
mveDave Kreskowiak15-Feb-11 15:21 
QuestionLINQ to Entities Pin
Tamimi - Code15-Feb-11 4:52
Tamimi - Code15-Feb-11 4:52 
AnswerRe: LINQ to Entities Pin
Pete O'Hanlon15-Feb-11 5:29
mvePete O'Hanlon15-Feb-11 5:29 
GeneralRe: LINQ to Entities Pin
Tamimi - Code15-Feb-11 5:47
Tamimi - Code15-Feb-11 5:47 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult15-Feb-11 6:31
mvePIEBALDconsult15-Feb-11 6:31 
GeneralRe: LINQ to Entities Pin
Pete O'Hanlon15-Feb-11 6:50
mvePete O'Hanlon15-Feb-11 6:50 
AnswerRe: LINQ to Entities Pin
musefan15-Feb-11 5:54
musefan15-Feb-11 5:54 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult15-Feb-11 6:28
mvePIEBALDconsult15-Feb-11 6:28 
GeneralRe: LINQ to Entities Pin
musefan15-Feb-11 6:50
musefan15-Feb-11 6:50 
GeneralRe: LINQ to Entities Pin
Rob Philpott15-Feb-11 8:29
Rob Philpott15-Feb-11 8:29 
GeneralRe: LINQ to Entities Pin
Not Active15-Feb-11 10:11
mentorNot Active15-Feb-11 10:11 
AnswerRe: LINQ to Entities Pin
PIEBALDconsult15-Feb-11 6:34
mvePIEBALDconsult15-Feb-11 6:34 
AnswerRe: LINQ to Entities Pin
Luc Pattyn15-Feb-11 6:56
sitebuilderLuc Pattyn15-Feb-11 6:56 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult15-Feb-11 7:02
mvePIEBALDconsult15-Feb-11 7:02 
GeneralRe: LINQ to Entities Pin
Pete O'Hanlon15-Feb-11 7:31
mvePete O'Hanlon15-Feb-11 7:31 
AnswerRe: LINQ to Entities Pin
OriginalGriff15-Feb-11 9:48
mveOriginalGriff15-Feb-11 9:48 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult15-Feb-11 10:21
mvePIEBALDconsult15-Feb-11 10:21 
GeneralRe: LINQ to Entities Pin
OriginalGriff15-Feb-11 21:18
mveOriginalGriff15-Feb-11 21:18 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult16-Feb-11 1:40
mvePIEBALDconsult16-Feb-11 1:40 
GeneralRe: LINQ to Entities Pin
OriginalGriff16-Feb-11 2:23
mveOriginalGriff16-Feb-11 2:23 
GeneralRe: LINQ to Entities Pin
PIEBALDconsult16-Feb-11 13:23
mvePIEBALDconsult16-Feb-11 13:23 
GeneralRe: LINQ to Entities Pin
OriginalGriff16-Feb-11 22:17
mveOriginalGriff16-Feb-11 22:17 
AnswerRe: LINQ to Entities Pin
Not Active15-Feb-11 10:07
mentorNot Active15-Feb-11 10:07 
QuestionSingleton Form updated from main Form - Object Reference Error Pin
Edunt15-Feb-11 4:36
Edunt15-Feb-11 4:36 
AnswerRe: Singleton Form updated from main Form - Object Reference Error Pin
Luc Pattyn15-Feb-11 5:20
sitebuilderLuc Pattyn15-Feb-11 5:20 
Something is wrong. Your child form gets created inside GetInstance() yet you never call that method, instead you refer directly to the frm member.

This is what you could do:
- make frm private;
- add a public Frm property, basically doing what GetInstance() did (note the case difference);
- get rid of GetInstance();
- whenever the parent form needs the child form, use frmChildForm.Frm

The better alternative would be to:
- make frm private;
- add a child member to your parent form;
- set it to the result of GetInstance() before using it, then use it instead of frmChildForm.frm

Same result, fewer public members, hence more reliable code.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

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.