I'm using VB .NET (2003) and I can't seem to get VB to recognise the My.Computer... method. It tells me the name 'My' is not declared:
Is this because my version of VB .NET doesn't support this method? Or am I doing something wrong?
\Thx
VB.NET:
Imports System.Net.Sockets
Imports System.Runtime.InteropServices
Imports System
Imports System.Net
Imports System.Net.NetworkCredential
Imports System.Text
Imports System.Windows.Forms.Form
Namespace System.Name
Public Class Form1
Sub MyPing()
If My.Computer.Network.Ping("198.01.01.01") Then
MsgBox("Server pinged successfully.")
Else
MsgBox("Ping request timed out.")
End If
End Sub
End Class
End Namespace
Is this because my version of VB .NET doesn't support this method? Or am I doing something wrong?
\Thx