I'm doing some work on a legacy application, and my VB6 skills aren't that great. I need to check whether a String field has been initialized and set to something other than null/nothing or an empty string. In C# I'd just do something like:
if (string.IsNullOrEmpty(myObj.Str))
I'm not sure what the equivalent to this was in VB6, and I'm nervous about using If myObj.Str = ""
and calling it good. What's the correct way to do this?
To clarify, I want something that will return True if any of the following are true:
The field was originally a Long, and the code I'm replacing checked whether it was set to 0.
VB6 was designed to be easy
Use
If str = "" Then
' uninitialised, null or empty ""