单项选择题
YouarecreatingaWindowsFormsapplicationbyusingthe.NETFramework3.5.Theapplicationrequiresathreadthatacceptsasingleintegerparameter.Youwritethefollowingcodesegment(Linenumbersareincludedforreferenceonly.)ThreadmyThread=newThread(newParameterizedThreadStart(DoWork));myThread.Start(100);YouneedtodeclarethemethodsignatureoftheDoWorkmethod.Whichmethodsignatureshouldyouuse?()
A.publicvoidDoWork();
B.publicvoidDoWork(intnCounter);
C.publicvoidDoWork(objectoCounter);
D.publicvoidDoWork(DelegateoCounter);
A.NETFramework3.5.Theapplicationrequiresathreadthatacceptsasingleintegerparameter.Youwritethefollowingcodesegment(Linenumbersareincludedforreferenceonly.)ThreadmyThread=newThread(newParameterizedThreadStart(DoWork));myThread.Start(100);YouneedtodeclarethemethodsignatureoftheDoWorkmethod.Whichmethodsignatureshouldyouuse?()
A.publicvoidDoWork();
B.publicvoidDoWork(intnCounter);
C.publicvoidDoWork(objectoCounter);
D.publicvoidDoWork(DelegateoCounter);