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 are multicast delegates?

0 Answers  


What are virtual destructures?

0 Answers  


How do you define the lease of the object?

1 Answers  


Please explain what is a delegate?

0 Answers  


Explain different types of cookies in .NET?

1 Answers  


Which among the following two is best and why? Abstract Class and Interface. What is the major difference in between those two except the discrete methods and methods with function definition.

4 Answers   247Customer,


Explain different types of html, web and server controls.

0 Answers  


you have a requirement from client, he has an XML file and you need to insert the data into 5-6 tables in database. explain me the procedure.

2 Answers   Deloitte,


What is the concept of inheritance and how it works in .net?

0 Answers  


Using activex control in .net?

0 Answers  


Can you write a class without specifying namespace?

0 Answers  


Explain when should you use .net web forms over asp.net mvc?

0 Answers  


Categories