.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

How can you reference current thread of the method ?

Posted By :Ghanashyam Nayak     Posted Date :January 03, 2011    Points :15   Category :.NET Framework 
"Thread.CurrentThread" refers to the current thread running in the
method."CurrentThread" is a public static property.

You can also find related Interview Question to How can you reference current thread of the method ?  below: 

How can you reference current thread of the method ?

  
"Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property. (More...)

How do I call a member method and pass a primitive type (Value Type) by reference?

  
Use the ref keyword when declaring the parameter of the method, for example:

public bool GetValue( ref int returnValue );

This will pass the numeric by reference.You can modify the value of returnValue within the body of GetValue and it will persist when the method call returns. (More...)

In a Java multithreading program, under what circumstances will you call the yield() method of a thread?

  
1, To give other runnable threads a chance to execute.
2, To start a new thread.
3, To terminate the current thread.
4, To stop the current thread for a specific time.

Answer : 1 (More...)

How to pass the arguments in thread by passing the arguments in start() method.

  
Thread t1 = new Thread(new ThreadStart(obj.abc));
t1.Start(21); (More...)

Which method use to run a new thread?

  
ThreadPool.QueueUserWorkItem (More...)

How do you call a Member method and pass a value Type by reference?

  
use the "ref" keyword when declaring a Parameter of the Method
Ex:
public bool GetValue(ref int returnvalue);
(More...)

How do you call a Member method and pass a value Type by reference?

  
use the "ref" keyword when declaring a Parameter of the Method (More...)

What is Method overloading?

  
Method overloading occurs when a class contains two methods with the same name, but different signatures. (More...)

What is Method Overriding? How to override a function in C#?

  
Use the override modifier to modify a method, a property, an indexer, or an event. An override method provides a new implementation of a member inherited from a base class. The method overridden by an override declaration is known as the overridden base method. The overridden base method must have the same signature as the override method.
You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override. (More...)

Can we call a base class method without creating instance?

  
Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend