EAPUtilToString Method (Object, String) |
Safely converts an object to a string. If the object is null or empty then the defaultValue is returned.
Note, however, that if both the converted object and defaultValue are null an empty string is returned.
A null value is never returned.
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static string ToString(
Object value,
string defaultValue
)
Public Shared Function ToString (
value As Object,
defaultValue As String
) As String
Parameters
- value
- Type: SystemObject
The object to convert - defaultValue
- Type: SystemString
The default value.
Return Value
Type:
StringThe converted value or defauleValue if the object is null/empty, an empty string (never) null if both are null.
See Also