My thread should return an array-list and put it into files.
My problem is that it just stops(at least that's how I see it).
Thread:
ArrayList files = new ArrayList();
Thread getF = new Thread(delegate()
{
files = GetFiles(path);
});
getF.Start();
if (getF.ThreadState == ThreadState.Stopped)
{
MessageBox.Show(files.Count.ToString());
foreach (string file in files)
{
if (file != "")
{...
getFiles:
ArrayList results = new ArrayList();
try
{
*loops**code*...
results.Add(srl);//add file to arrFiles
*end loops*
MessageBox.Show("Complete");
return results;
}
The program just gives me the MessageBox.Show("Complete") and then does nothing. Thanks in advance.