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 |
What are the drawbacks for Model-View-Controller Architecture?
What are the different types of memory in .net?
How boxing and unboxing occures in memory?
WHAT IS .net
Explain what is the difference between a class and an object?
How to load a user control dynamically in runtime?
where are connection strings stored?
How would ASP and ASP.NET apps run at the same time on the same server?
Is do-it (chennai) a good institute to learn dot-net???? are the trainers well experienced??
What is Polymorphism? How does VB.NET/C# achieve polymorphism?
Explain manifest & metadata.
What does cil do?