Anonymous user
Empty string: Difference between revisions
→Visual Basic .NET#In depth: Clarified
(→In depth: Added note about VB runtime in .NET Core) |
(→Visual Basic .NET#In depth: Clarified) |
||
Line 2,235:
'#Is operator
' The Is operator tests for reference equality. However, which strings are interned is a CLR implementation
' detail and may be unreliable when comparing non-empty strings. The equivalent in C# would be (object)s == String.Empty.
' Note that there is no such operator as Object.op_Equality(Object, Object): the use of the == operator for▼
' types of type Object is a C# language feature.▼
P(s Is "")
'#Object.ReferenceEquals(Object, Object)
' The previous line is semantically to the following, though it does not
▲ ' Note that there is no such operator as Object.op_Equality(Object, Object): the use of the == operator for
▲ ' types of type Object is a C# language feature.
P(Object.ReferenceEquals(s, ""))
|