Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write the sample code for threading in c# .net..

Answers were Sorted based on User's Feedback



Write the sample code for threading in c# .net....

Answer / alcheringa

using system.threading;
// this is the function that we want to invoke in a new
thread

static void doit()
{
for (int i=0 ; i < 10; i++)
{
console.writeline("doing somethin");
}
}
// this is the main fucntion

public static void main()
{
// threadstart is the delegate
// we need to pass the method, ts accept's method name as
the parameter
threadstart ts=new threadstart(doit);
// this is how we define a new thread

thread tr=new thread(ts);
// we invoke the thread
tr.start()
conosle.readline();
}

Is This Answer Correct ?    22 Yes 10 No

Write the sample code for threading in c# .net....

Answer / gby

question to Alcheringa?
So why did you define int i? ????

Is This Answer Correct ?    8 Yes 5 No

Write the sample code for threading in c# .net....

Answer / sivakumar v

Static Void Run()
{
Console.WriteLine("Thread Is Running");

}
static void Main()
{
Thread TrdObj=new Thread(Run);//create the obj
TrdObj.start();

}

Is This Answer Correct ?    3 Yes 1 No

Write the sample code for threading in c# .net....

Answer / maryada ramana

first uhave to learn c#.net then u will undertsand how much
diff is .net useless fellow Alcheringa a prentra alcherenga
kampalo putinaava

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More C Sharp Interview Questions

What is CASPOL?

0 Answers   MCN Solutions,


FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ?EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER?????PLEASE REPLY...

1 Answers  


What is the value which is accepted by all data types ?

0 Answers   MCN Solutions,


What is class in oops with example in c#?

0 Answers  


How do you specify a custom attribute for the entire assembly?

0 Answers  


Why is it called c sharp?

0 Answers  


Is array reference type / value type?

15 Answers   Accenture,


What is the Difference between a sub and a function?

3 Answers   Wipro,


Define Final Class in C#

0 Answers   HCL,


What does console writeline do?

0 Answers  


Why do we need ienumerable in c#?

0 Answers  


What is the difference between array and arraylist c#?

0 Answers  


Categories