Why is this an issue?
Calling ToString() on an object should always return a
string
. Thus, overriding the ToString method should never return Nothing
, as it breaks the method’s implicit contract, and
as a result the consumer’s expectations.
Public Overrides Function ToString() As String
Return Nothing ' Noncompliant
End Function
Public Overrides Function ToString() As String
Return ""
End Function
Resources
Documentation