Access of shared member, constant member, enum member or nested type through an instance; qualifying

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I have a program that defines and starts a thread as follows:
<span style="font-size:x-small <font size="2" style="font-size:x-small

</font><span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small Public<span style="font-size:x-small ThreadeFlowImport
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small As<span style="font-size:x-small Thread<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small ThreadeFlowImport
= <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small New<span style="font-size:x-small Thread(<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small New<span style="font-size:x-small
ThreadStart(<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small AddressOf<span style="font-size:x-small ThreadImportFired))
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small ThreadeFlowImport.Start()
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small VS does not have a problem with these lines. Later in the program, I have this line:
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small ThreadeFlowImport.CurrentThread.Sleep(30000)
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small VS underlines it and gives the warning "Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not
be evaluated."
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small The program was written in VS 2003, which did not give this warning. I started getting the warning when I imported it into VS 2005. Can anyone tell me why 2005
has a problem with the line and what I can do about it? Thanks.
<span style="font-size:x-small <span style="font-size:x-small

View the full article
 
Back
Top