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...


How do you create threading in .NET? What is the namespace
for that?

Answers were Sorted based on User's Feedback



How do you create threading in .NET? What is the namespace for that?..

Answer / sabu

using System;
using System.Threading;
namespace ConsoleApplication1
{
class Class1
{
static void PrintHelloFromThreadName()
{
Console.WriteLine("Hello, from thread {0}",
Thread.CurrentThread.Name); // {0}
}
public void ThreadStart()
{
PrintHelloFromThreadName();
}
static void Main(string[] args)
{
Thread.CurrentThread.Name = "Main thread";
Class1 obj = new Class1();
Thread thread = new Thread(
new ThreadStart(obj.ThreadStart));
thread.Name = "Forked thread";
thread.Start();
PrintHelloFromThreadName();
}

Is This Answer Correct ?    4 Yes 1 No

How do you create threading in .NET? What is the namespace for that?..

Answer / kinjal

for threading namespace in .NET is
using System.Treading

static void Main(string[] args)
{
Thread.currenttread.name="k";
Console.WriteLine("name is {0}" , Thread.currentthread.name)
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Dot Net General Interview Questions

What is different between Web User Control and Web Custom Control?

1 Answers  


I am constantly writing the drawing procedures with system.drawing.graphics, but having to use the try and dispose blocks is too time-consuming with graphicsobjects. Can I automate this?

0 Answers  


Is do-it (chennai) a good institute to learn dot-net???? are the trainers well experienced??

2 Answers   Satyam,


What is Entity Relationship Model in .NET?

0 Answers   Viscus Infotech,


What is a Strong Name?

1 Answers  


How do you instantiate a complex number?

0 Answers  


Explain me what is the difference between an abstract class and an interface?

0 Answers  


How do you trigger the paint event in system.drawing?

0 Answers  


Explain the top .net class that everything is derived from?

0 Answers  


What's singlecall activation mode used for in .net?

0 Answers  


How to customize the trace output?

0 Answers  


What method do you use to explicitly kill a users session? How?

0 Answers  


Categories