Better way to write if (PenID.ToString() != "00000000-0000-0000-0000-000000000000")?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

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
 
Ronald S. Cook said:
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)
{
....
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top