mattphung
asked on
How do I check if a GUID is nothing or null?
How do I check if a GUID is nothing or null?
Is there a built in function lfor this?
Is there a built in function lfor this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in VB.NET you can't compare an object ot nothing like that. You should also be able to use
if objGUID is nothing then
but the same applies, you cant use =nothing like you can use == null in c#
if objGUID is nothing then
but the same applies, you cant use =nothing like you can use == null in c#
C#:
if (guidVariable == Guid.Empty)
VB.NET:
If guidVariable.Equals(Guid.E mpty) Then
Bob
if (guidVariable == Guid.Empty)
VB.NET:
If guidVariable.Equals(Guid.E
Bob
ASKER
if objGUID = nothing then
I get an error message "=" is not defined for type "system.GUID"
why does " Isnothing()" works but "= nothing" doesn't?