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

C#

 
AnswerRe: Output type of Class Library cannot be started directly Pin
Pete O'Hanlon23-May-10 10:00
mvePete O'Hanlon23-May-10 10:00 
GeneralRe: Output type of Class Library cannot be started directly Pin
tan_chin23-May-10 10:29
tan_chin23-May-10 10:29 
QuestionExcel number of rows Pin
gmhanna23-May-10 7:37
gmhanna23-May-10 7:37 
AnswerRe: Excel number of rows Pin
Abhinav S23-May-10 7:42
Abhinav S23-May-10 7:42 
QuestionArraylist Goes Null after Passing information back to Main Page from Window. Pin
PDTUM23-May-10 7:23
PDTUM23-May-10 7:23 
AnswerRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
Abhinav S23-May-10 7:38
Abhinav S23-May-10 7:38 
GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
PDTUM23-May-10 8:28
PDTUM23-May-10 8:28 
GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
OriginalGriff23-May-10 9:05
mveOriginalGriff23-May-10 9:05 
So, in your frmMain, you have an ArrayList. And a button.
You click the button, and create an instance of your second page, a form called "Where". You then show the form using ShowDialog().
In the form, you merrily add to your ArrayList, and hand it to a new instance of your main form.
Your Where form then closes.

What has happened, is that you new frmMain instance goes out of scope. It is then destroyed. Allongh with it's copy of the ArrayList.
You are then back in your original instance of frmMain, just after your ShowDialog call, and you check the ArrayList. Supprise! It's empty!

Of course it's empty! You added all your data to the local instance you created in the Where form.

What you need to do is when you get back to your original instance, get the arrayList reference from the Where form instance, and copy it to the checkdNames arrayList.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
OriginalGriff23-May-10 9:08
mveOriginalGriff23-May-10 9:08 
GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
PDTUM23-May-10 9:16
PDTUM23-May-10 9:16 
GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
PDTUM23-May-10 16:44
PDTUM23-May-10 16:44 
GeneralRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
OriginalGriff23-May-10 23:22
mveOriginalGriff23-May-10 23:22 
AnswerRe: Arraylist Goes Null after Passing information back to Main Page from Window. Pin
PDTUM24-May-10 9:01
PDTUM24-May-10 9:01 
QuestionParsing plain Win32 PE File (Exe/DLL) in C#.NET Pin
glitteringsound23-May-10 4:30
glitteringsound23-May-10 4:30 
AnswerRe: Parsing plain Win32 PE File (Exe/DLL) in C#.NET Pin
Luc Pattyn23-May-10 5:07
sitebuilderLuc Pattyn23-May-10 5:07 
AnswerRe: Parsing plain Win32 PE File (Exe/DLL) in C#.NET Pin
Dave Kreskowiak23-May-10 18:22
mveDave Kreskowiak23-May-10 18:22 
Questionlistview last sorting [modified] Pin
teknolog12323-May-10 4:02
teknolog12323-May-10 4:02 
AnswerRe: listview last sorting Pin
Dr.Walt Fair, PE23-May-10 4:52
professionalDr.Walt Fair, PE23-May-10 4:52 
AnswerRe: listview last sorting Pin
Abhinav S23-May-10 4:59
Abhinav S23-May-10 4:59 
Questiondatabase connection problems about C# ,unable to connect database Pin
Make Up Forever23-May-10 2:34
Make Up Forever23-May-10 2:34 
AnswerRe: database connection problems about C# ,unable to connect database Pin
Abhinav S23-May-10 2:35
Abhinav S23-May-10 2:35 
AnswerRe: database connection problems about C# ,unable to connect database Pin
Luc Pattyn23-May-10 2:38
sitebuilderLuc Pattyn23-May-10 2:38 
QuestionRead access on class local fields from multiple threads Pin
Chesnokov Yuriy22-May-10 23:36
professionalChesnokov Yuriy22-May-10 23:36 
AnswerRe: Read access on class local fields from multiple threads Pin
DaveyM6923-May-10 0:47
professionalDaveyM6923-May-10 0:47 
QuestionBackgroundWorker.IsBusy failure!? Pin
Chesnokov Yuriy22-May-10 23:32
professionalChesnokov Yuriy22-May-10 23:32 

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.