Click here to Skip to main content
15,922,650 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Singleton Form updated from main Form - Object Reference Error Pin
Edunt15-Feb-11 9:28
Edunt15-Feb-11 9:28 
GeneralRe: Singleton Form updated from main Form - Object Reference Error Pin
Luc Pattyn15-Feb-11 10:10
sitebuilderLuc Pattyn15-Feb-11 10:10 
AnswerRe: Singleton Form updated from main Form - Object Reference Error Pin
musefan15-Feb-11 5:26
musefan15-Feb-11 5:26 
GeneralRe: Singleton Form updated from main Form - Object Reference Error Pin
Edunt15-Feb-11 9:45
Edunt15-Feb-11 9:45 
AnswerRe: Singleton Form updated from main Form - Object Reference Error Pin
_Erik_15-Feb-11 5:47
_Erik_15-Feb-11 5:47 
AnswerRe: Singleton Form updated from main Form - Object Reference Error [modified] Pin
Edunt15-Feb-11 10:07
Edunt15-Feb-11 10:07 
Questionremove duplicates from list collection Pin
arkiboys15-Feb-11 0:40
arkiboys15-Feb-11 0:40 
AnswerRe: remove duplicates from list collection Pin
Pravin Patil, Mumbai15-Feb-11 0:53
Pravin Patil, Mumbai15-Feb-11 0:53 
GeneralRe: remove duplicates from list collection Pin
arkiboys15-Feb-11 0:57
arkiboys15-Feb-11 0:57 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 1:28
musefan15-Feb-11 1:28 
GeneralRe: remove duplicates from list collection Pin
PIEBALDconsult15-Feb-11 1:49
mvePIEBALDconsult15-Feb-11 1:49 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 1:58
musefan15-Feb-11 1:58 
GeneralRe: remove duplicates from list collection Pin
PIEBALDconsult15-Feb-11 4:07
mvePIEBALDconsult15-Feb-11 4:07 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 4:12
musefan15-Feb-11 4:12 
GeneralRe: remove duplicates from list collection Pin
PIEBALDconsult15-Feb-11 4:31
mvePIEBALDconsult15-Feb-11 4:31 
GeneralRe: remove duplicates from list collection Pin
Pravin Patil, Mumbai15-Feb-11 1:50
Pravin Patil, Mumbai15-Feb-11 1:50 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 1:53
musefan15-Feb-11 1:53 
GeneralRe: remove duplicates from list collection Pin
Luc Pattyn15-Feb-11 2:36
sitebuilderLuc Pattyn15-Feb-11 2:36 
AnswerRe: remove duplicates from list collection Pin
musefan15-Feb-11 0:55
musefan15-Feb-11 0:55 
GeneralRe: remove duplicates from list collection Pin
arkiboys15-Feb-11 0:58
arkiboys15-Feb-11 0:58 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 1:05
musefan15-Feb-11 1:05 
GeneralRe: remove duplicates from list collection Pin
arkiboys15-Feb-11 1:08
arkiboys15-Feb-11 1:08 
GeneralRe: remove duplicates from list collection Pin
musefan15-Feb-11 1:12
musefan15-Feb-11 1:12 
so you should check to see if the list already contains myClass before you add it in...

foreach(...)
{
   if(!myList.Contains(myClass))
      myList.Add(myClass);
}


...not 100% sure the contains will work with a class but worth a try

EDIT: Tested and does NOT work
Illogical thoughts make me ill

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.