You don't have to be a rocket scientist to translate from C# to VB.net, c'mon the code you posted is all to easy, just look at it!
> PingClient client = new PingClient();
'this is obviously a declaration, so in vb.net
Dim client as PingClient = new PingClient
> PingReply reply = client.Ping("www.example.com");
'Here is another declaration
Dim reply as PingReplay = client.Ping("www.example.com")
'Please tell me you know how to make an if statement
if reply.success = true then
message = "Reply took " & reply.Time & " milliseconds")
end if
??? just confused that you couldn't figure that out for yourself...am I missing something?
--Michael
"Devin" <> wrote in message news:A163353E-F118-4042-BCDE-...
> I need a way to ping an IP address from an ASP.NET page to verify that it is not in use. This is one example given to me earlier, but unfortunetly I do not know C#. Could someone translate this into VB for me? or perhaps know of another way to easily ping an IP from an ASP.NET page.
>
> Thanks Devin
>
> Found at http://www.asp.net/ControlGallery/Co...069&tabindex=2
>
> PingClient client = new PingClient();
>
> PingReply reply = client.Ping("www.example.com");
>
> if (reply.Success)
> {
> string message = "Reply took " + reply.Time + " milliseconds");
> }
>