Click here to Skip to main content
15,065,044 members
Home / Discussions / C#
   

C#

 
GeneralRe: OK. Pin
Technobizz11-Jul-08 1:39
MemberTechnobizz11-Jul-08 1:39 
GeneralRe: OK. Pin
CPallini11-Jul-08 1:53
mveCPallini11-Jul-08 1:53 
Questionelog vs wmi Pin
Mogaambo11-Jul-08 0:23
MemberMogaambo11-Jul-08 0:23 
AnswerRe: elog vs wmi Pin
nadarajan.sathish15-Sep-09 0:30
Membernadarajan.sathish15-Sep-09 0:30 
QuestionIs it possible to call VB 6 libraries in c# 2008? Pin
1.21 Gigawatts10-Jul-08 23:36
Member1.21 Gigawatts10-Jul-08 23:36 
AnswerRe: Is it possible to call VB 6 libraries in c# 2008? Pin
Simon P Stevens10-Jul-08 23:46
MemberSimon P Stevens10-Jul-08 23:46 
GeneralRe: Is it possible to call VB 6 libraries in c# 2008? Pin
1.21 Gigawatts10-Jul-08 23:52
Member1.21 Gigawatts10-Jul-08 23:52 
QuestionHow to Multiple Thread execute at Same Time(simultaneously) in c#. [modified] Pin
bruze10-Jul-08 23:03
Memberbruze10-Jul-08 23:03 
Can any one Help,

I have create Multiple Thread and Call the function in c#.
The Code as follows

using System;
using System.Threading;

namespace ThreadPool
{
   public class Program
    {
        static void Main(string[] args)
        {
            Program pa = new Program();

            Thread firstThread = new Thread(new ThreadStart(pa.Name));
            Thread secondThread = new Thread(new ThreadStart(pa.Name));
            Thread thirdThread = new Thread(new ThreadStart(pa.Name));
            Thread fourthThread = new Thread(new ThreadStart(pa.Name));
            Thread fifthThread = new Thread(new ThreadStart(pa.Name));

            firstThread.Start();
            secondThread.Start();
            thirdThread.Start();
            fourthThread.Start();
            fifthThread.Start();
            Console.ReadLine();
        }
        public void Name()
        {
            
            Console.WriteLine("My Name is Bruze" );
            
            Console.WriteLine("GO!!!!!");
        }
    }


The above code Multiple Thread (firstThread,secondThread,thirdThread,fifthThread,fifthThread) execute one by one.
I want Multiple Thread execute at Same Time(simultaneously) in c#.

modified on Friday, July 11, 2008 7:26 AM

AnswerRe: How to Multiple Thread Start at the Same Time in c# Pin
N a v a n e e t h10-Jul-08 23:09
MemberN a v a n e e t h10-Jul-08 23:09 
AnswerRe: How to Multiple Thread Start at the Same Time in c# Pin
Mark Churchill11-Jul-08 1:02
MemberMark Churchill11-Jul-08 1:02 
AnswerRe: How to Multiple Thread execute at Same Time(simultaneously) in c#. Pin
Technobizz11-Jul-08 1:43
MemberTechnobizz11-Jul-08 1:43 
AnswerRe: How to Multiple Thread execute at Same Time(simultaneously) in c#. Pin
killabyte11-Jul-08 2:50
Memberkillabyte11-Jul-08 2:50 
AnswerRe: How to Multiple Thread execute at Same Time(simultaneously) in c#. Pin
Luc Pattyn11-Jul-08 3:11
sitebuilderLuc Pattyn11-Jul-08 3:11 
QuestionHow would you test this Pin
Razvan Dimescu10-Jul-08 22:15
MemberRazvan Dimescu10-Jul-08 22:15 
AnswerRe: How would you test this Pin
N a v a n e e t h10-Jul-08 22:30
MemberN a v a n e e t h10-Jul-08 22:30 
GeneralRe: How would you test this Pin
Razvan Dimescu10-Jul-08 23:01
MemberRazvan Dimescu10-Jul-08 23:01 
GeneralRe: How would you test this Pin
N a v a n e e t h10-Jul-08 23:14
MemberN a v a n e e t h10-Jul-08 23:14 
GeneralRe: How would you test this Pin
Razvan Dimescu10-Jul-08 23:24
MemberRazvan Dimescu10-Jul-08 23:24 
GeneralRe: How would you test this Pin
N a v a n e e t h13-Jul-08 16:59
MemberN a v a n e e t h13-Jul-08 16:59 
AnswerRe: How would you test this Pin
Mark Churchill11-Jul-08 0:57
MemberMark Churchill11-Jul-08 0:57 
Questionsql to mysql Pin
ali_reza_zareian10-Jul-08 22:01
Memberali_reza_zareian10-Jul-08 22:01 
AnswerRe: sql to mysql Pin
N a v a n e e t h10-Jul-08 22:33
MemberN a v a n e e t h10-Jul-08 22:33 
GeneralRe: sql to mysql Pin
yiren_shao10-Jul-08 22:51
Memberyiren_shao10-Jul-08 22:51 
AnswerRe: sql to mysql Pin
scottgp11-Jul-08 2:55
professionalscottgp11-Jul-08 2:55 
QuestionTransparency in compact framework Pin
Subasish_CodeProject10-Jul-08 20:48
MemberSubasish_CodeProject10-Jul-08 20:48 

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.