How to use Guids in C#?

Ante picture Ante · May 24, 2009 · Viewed 81.9k times · Source

This Code:

Something = new Guid() 

is returning:

00000000-0000-0000-0000-000000000000

all the time and I can't tell why? So, why?

Answer

Will Dean picture Will Dean · May 24, 2009

You should use Guid.NewGuid()