Hello,
I have the following custom control property:
' Example
Private _Example As String
< _
Bindable(True), _
Category("Appearance"), _
DefaultValue(""), _
Localizable(True) _
> _
Property Example() As String
Get
Return _Example
End Get
Set(ByVal value As String)
_Example = value
End Set
End Property ' Example
What is the difference between using:
If Me.Example = Nothing Then
If Me.Example Is Nothing Then
If String.IsNullOrEmpty(Me.Example) Then
Thanks,
Miguel
Alexey Smirnov - 30 Oct 2007 20:27 GMT
> Hello,
>
[quoted text clipped - 26 lines]
>
> Miguel
IsNullOrEmpty checks if string is a null or an Empty string ("").
According to the following bug report it might not work
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=
113102
"If Me.Example = Nothing Then" should be used with "IS" instead of "="