Given that PenID is a Guid, is there a better way to write this?
if (PenID.ToString() != "00000000-0000-0000-0000-000000000000")
I thought I could do some sort of Guid.Empty check or something.
Thanks,
Ron
Alex Meleta - 30 Jun 2007 14:36 GMT
Hi,
If PenID's type is Guid also, so it can be like: PenID.Equals(Guid.Empty)
Regards, Alex
http://devkids.blogspot.com
> Given that PenID is a Guid, is there a better way to write this?
>
[quoted text clipped - 4 lines]
> Thanks,
> Ro
Jon Skeet [C# MVP] - 30 Jun 2007 19:22 GMT
> Given that PenID is a Guid, is there a better way to write this?
>
> if (PenID.ToString() != "00000000-0000-0000-0000-000000000000")
>
> I thought I could do some sort of Guid.Empty check or something.
if (penID != Guid.Empty)
{
....
}

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too