Vb Net2005 putting thread to sleep

B

Bob

The line
Thread.CurrentThread.Sleep(intRetryInterval) in 2005 (worked OK in 2003, I
think)

gives me a warning that Access of Shared Member, Constant Member, enum
member or nested type through an instance, qualifying expression will not be
evaluated.

OK I agree, so now what? I just want to put this thread to sleep for 10
milliseconds.

How do I do that now in Vb.net 2005

Any help appreciated.

Bob
 
H

Herfried K. Wagner [MVP]

Bob said:
Thread.CurrentThread.Sleep(intRetryInterval) in 2005 (worked OK in 2003,
I think)

gives me a warning that Access of Shared Member, Constant Member, enum
member or nested type through an instance, qualifying expression will not
be evaluated.

'Thread.Sleep' is actually a shared method. Simply replace the call above
with 'Thread.Sleep(RetryInterval)', even in VS.NET 2003.
 
B

Bob

Thanks
Herfried K. Wagner said:
'Thread.Sleep' is actually a shared method. Simply replace the call above
with 'Thread.Sleep(RetryInterval)', even in VS.NET 2003.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top