I have questions about System.Threading.ThreadStart Class :
- where can I find its specifications ( there is praticly nothing in the msdn : http://msdn.microsoft.com/en-us/library/system.threading.t开发者_如何学JAVAhreadstart.aspx or in ROTOR : www.dotnet247.com/247reference/system/threading/threadstart/__rotor.aspx)
- what is its field : protected System.IntPtr _methodPtrAux
thanks
Well, if you got ROTOR, you should have been able to answer at least one of your questions:
// In the case of a static method passed to a delegate, this field stores
// whatever _methodPtr would have stored: and _methodPtr points to a
// small thunk which removes the "this" pointer before going on
// to _methodPtrAux.
internal IntPtr _methodPtrAux;
1) ThreadStart is a delegate, not a class. It is a variable that holds a pointer to a method. In this case, it is any method that takes no parameters and returns no variable. So you can do something like this:
private void SomeMethod() {}
public void StartThreadingLol()
{
var thread = new Thread(SomeMethod);
}
2) Whatever field that is it doesn't have anything to do with you as a .NET programmer. Why do you think you need it?
精彩评论