Vb Net2005 putting thread to sleep

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    #1

    Vb Net2005 putting thread to sleep

    The line
    Thread.CurrentT hread.Sleep(int RetryInterval) 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




  • Herfried K. Wagner [MVP]

    #2
    Re: Vb Net2005 putting thread to sleep

    "Bob" <bdufour@sgiims .com> schrieb:[color=blue]
    > Thread.CurrentT hread.Sleep(int RetryInterval) 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.[/color]

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

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Bob

      #3
      Re: Vb Net2005 putting thread to sleep

      Thanks
      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
      news:OwenUaHcGH A.4108@TK2MSFTN GP03.phx.gbl...[color=blue]
      > "Bob" <bdufour@sgiims .com> schrieb:[color=green]
      >> Thread.CurrentT hread.Sleep(int RetryInterval) 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.[/color]
      >
      > 'Thread.Sleep' is actually a shared method. Simply replace the call above
      > with 'Thread.Sleep(R etryInterval)', even in VS.NET 2003.
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>[/color]


      Comment

      Working...