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 is web.config in .net?
i have 2 functions, int add(int a,int b); double add(int a,int b); does this code implement overloading? if not what will be the error?
Explain what is heap and what is stack?
What is Assembly?
Please tell us what is the difference between override and overload in a method?
What are Satellite Assemblies? How you will create this? How will you get the different language strings?
Which is the main Difference Between .Net 2003 and .Net 2005?
Explain what is immutability, what is it for and how is it codified?
What is Code group in .Net with respect to CAS
What is misl?
Explain different types of html, web and server controls.
What is model-view -controller Architecture?