L
Laurel
How can I test to see if a string parameter is null?
This worked... or at least didn't give a compile error, but the debugger
seemed to show it skipping the assignment statement, and for sure, returnXML
was never set. (Any help on that bit too?) ERPHostId is a string parameter
in the function, and this is the first executable statement in the function.
if (ERPHostId != null)
returnXML = "<ERP></ERP>";
return ReturnCode.FAILURE;
But this gave me a compile error: C:\DEV QX
C#\6.4.1\QX.Data\QXMyInfo.cs(17): Cannot implicitly convert type 'string' to
'bool'
if (ERPHostId = null)
returnXML = "<ERP></ERP>";
return ReturnCode.FAILURE;
This worked... or at least didn't give a compile error, but the debugger
seemed to show it skipping the assignment statement, and for sure, returnXML
was never set. (Any help on that bit too?) ERPHostId is a string parameter
in the function, and this is the first executable statement in the function.
if (ERPHostId != null)
returnXML = "<ERP></ERP>";
return ReturnCode.FAILURE;
But this gave me a compile error: C:\DEV QX
C#\6.4.1\QX.Data\QXMyInfo.cs(17): Cannot implicitly convert type 'string' to
'bool'
if (ERPHostId = null)
returnXML = "<ERP></ERP>";
return ReturnCode.FAILURE;