Barry Maccaukner
New member


thanks for the help
Last edited:
Dim myString As String = String.Empty
'This tests whether myString is a null reference, i.e. whether the myString variable refers to no object.
If myString Is Nothing Then
MessageBox.Show("myString Is Nothing")
Else
MessageBox.Show("Not myString Is Nothing")
End If
'This tests whether myString is a String object that contains nothing, i.e. is an empty string.
If myString = Nothing Then
MessageBox.Show("myString = Nothing")
Else
MessageBox.Show("myString <> Nothing")
End If
Dim result As DialogResult = MessageBox.Show("Please press the Cancel button.", _
"DialogResult Test 1", _
MessageBoxButtons.OKCancel, _
MessageBoxIcon.Information, _
MessageBoxDefaultButton.Button2)
MessageBox.Show(String.Format("You pressed the {0} button. Its numerical value is {1}.", _
result.ToString(), _
CInt(result)))
result = MessageBox.Show("Please press the Close button in the title bar.", _
"DialogResult Test 2", _
MessageBoxButtons.OKCancel, _
MessageBoxIcon.Information, _
MessageBoxDefaultButton.Button2)
MessageBox.Show(String.Format("You pressed the {0} button. Its numerical value is {1}.", _
result.ToString(), _
CInt(result)))