Click here to Skip to main content
15,909,896 members
Home / Discussions / C#
   

C#

 
Questionfull error "Automation server can't create object" Pin
hasantayyar12-Apr-06 8:53
hasantayyar12-Apr-06 8:53 
Questionhow to create a floating toolbar in c#? Pin
Susuko12-Apr-06 8:52
Susuko12-Apr-06 8:52 
QuestionThreading help? Pin
eric_tran12-Apr-06 8:13
eric_tran12-Apr-06 8:13 
AnswerRe: Threading help? Pin
Judah Gabriel Himango12-Apr-06 8:26
sponsorJudah Gabriel Himango12-Apr-06 8:26 
GeneralRe: Threading help? Pin
eric_tran12-Apr-06 8:37
eric_tran12-Apr-06 8:37 
GeneralRe: Threading help? Pin
Dan Neely12-Apr-06 8:55
Dan Neely12-Apr-06 8:55 
GeneralRe: Threading help? Pin
eric_tran12-Apr-06 8:58
eric_tran12-Apr-06 8:58 
GeneralRe: Threading help? Pin
Judah Gabriel Himango12-Apr-06 9:06
sponsorJudah Gabriel Himango12-Apr-06 9:06 
Make sure you've got

using System.Threading;


at the top of your .cs file where you use ParameterizedThreadStart.

You can read more about it here[^].

There are several alternatives though, including some that work on all .NET versions. Here's another way of starting a new thread, using Delegate.BeginInvoke:

public class MyClass
{
    public delegate void FunctionThatTakesAnArrayList(ArrayList argument);

    ...

    void StartTheThread()
    {
        FunctionThatTakesAnArrayList function = ThreadedArrayListUsage;
        function.BeginInvoke(myArrayList, null, null); // BeginInvoke will cause the method to be executed on a new thread.
    }

    void ThreadedArrayListUsage(ArrayList list)
    {
        // use it here
    }

}


Here's another way, using the .NET thread pool:

void StartTheThread()
{
    System.Threading.ThreadPool.QueueUserWorkItem(ThreadedArrayListUsage, myArrayList);
}

void ThreadedArrayListUsage(object state)
{
    ArrayList list = (ArrayList)state;
}


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: Threading help? Pin
eric_tran12-Apr-06 9:08
eric_tran12-Apr-06 9:08 
QuestionTooltip does not show up Pin
smurfy3412-Apr-06 7:35
smurfy3412-Apr-06 7:35 
AnswerRe: Tooltip does not show up Pin
Manas Bhardwaj12-Apr-06 23:15
professionalManas Bhardwaj12-Apr-06 23:15 
GeneralRe: Tooltip does not show up Pin
smurfy3414-Apr-06 4:19
smurfy3414-Apr-06 4:19 
AnswerRe: Tooltip does not show up Pin
lvanerstrom14-Apr-06 8:18
lvanerstrom14-Apr-06 8:18 
GeneralRe: Tooltip does not show up Pin
smurfy3414-Apr-06 9:14
smurfy3414-Apr-06 9:14 
QuestionSynchronization thread help? Pin
eric_tran12-Apr-06 7:28
eric_tran12-Apr-06 7:28 
AnswerRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 7:43
sponsorJudah Gabriel Himango12-Apr-06 7:43 
GeneralRe: Synchronization thread help? Pin
eric_tran12-Apr-06 8:11
eric_tran12-Apr-06 8:11 
GeneralRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 8:25
sponsorJudah Gabriel Himango12-Apr-06 8:25 
GeneralRe: Synchronization thread help? Pin
eric_tran12-Apr-06 8:29
eric_tran12-Apr-06 8:29 
GeneralRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 9:07
sponsorJudah Gabriel Himango12-Apr-06 9:07 
QuestionHelp required for Hiding in Wav Format Pin
nwr_mn12-Apr-06 7:23
nwr_mn12-Apr-06 7:23 
AnswerRe: Help required for Hiding in Wav Format Pin
Corinna John12-Apr-06 21:25
Corinna John12-Apr-06 21:25 
QuestionHow to encrypt XML file Pin
engsrini12-Apr-06 7:15
engsrini12-Apr-06 7:15 
QuestionHow do I enter a field with the entry selected Pin
smurfy3412-Apr-06 6:24
smurfy3412-Apr-06 6:24 
AnswerRe: How do I enter a field with the entry selected Pin
darkelv12-Apr-06 6:42
darkelv12-Apr-06 6:42 

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.