ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
Write the sample code for threading in c# .net..
 Question Submitted By :: Samplestudy
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write the sample code for threading in c# .net..
Answer
# 1
using system.threading;
// this is the function that we want to invoke in a new 
thread

static void doit()
{
for (int i=0 ; i < 10; i++)
{
console.writeline("doing somethin");
}
}
// this is the main fucntion

public static void main()
{
// threadstart is the delegate 
// we need to pass the method, ts accept's method name as 
the parameter
threadstart ts=new threadstart(doit);
// this is how we define a new thread

thread tr=new thread(ts);
// we invoke the thread 
tr.start()
conosle.readline();
}
 
Is This Answer Correct ?    8 Yes 2 No
Alcheringa
 
  Re: Write the sample code for threading in c# .net..
Answer
# 2
question to  Alcheringa?
So why did you define int i? ????
 
Is This Answer Correct ?    2 Yes 1 No
Gby
 
 
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
How does a function pointer returns a function pointer? Wipro3
what is a template? Choice-Solutions2
What?s the difference between the System.Array.CopyTo() and System.Array.Clone()?  4
How?s the DLL Hell problem solved in .NET?  2
What is manifest ? Digital-GlobalSoft1
can u tell me any one steps for creatting sn.k  2
What is a pre-requisite for connection pooling?  1
Can you inherit multiple interfaces? Mind-Tree4
SqlCommand cmd = new SqlCommand(); using (cmd) {...} Referring to the above, what method is implicitly called at the end of the "using" statement? IBM1
what is uniary operators and binary operators and what is the difference Protech1
if i want to transmit binary data,,,will it be support by Webservices or any exceptions ? define  1
Can an interface inherit class/abstract class. Synechron1
If all code is written in a try block and write a catch block with Exception type Exception .In that scenario will all the exceptions catched by that catch block? or any exceptions which will not be caught? Honeywell3
What namespaces are necessary to create a localized application?  1
What is the Difference between read only and constant variables? SilverKey6
What does Dispose method do with the connection object?  2
When you inherit a protected class-level variable, who is it available to? IBM5
wt is namespace? wt is the use?  10
What is the difference between TypeOf, GetType and what are the uses of TypeOf, GetType. Siemens2
what is Anonymous Method.? and What is shadowing? ATS2
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com