How do you create threading in .NET? What is the namespace
for that?
Answers were Sorted based on User's Feedback
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 |
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 |
Where does the gac exist ?
Which property is used in the email to send the content as HTML
How to manage pagination in a page using .net?
What is garbage collection in .net? Explain the garbage collection process?
What do you mean by Code Access Security in .NET?
What are the types of jit?
How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
What is the difference between custom control and web control?
Explain the use of ‘this’ keyword in Java?
How many languages .NET is supporting now?
38 Answers Dreamtech, IBS, Microsoft, Polaris, RDT, Softcon, Viscus Infotech,
How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?
What is immutability?