Guid.NewGuid() vs. new Guid()

OscarRyz picture OscarRyz · Aug 13, 2012 · Viewed 191.5k times · Source

What's the difference between Guid.NewGuid() and new Guid()?

Which one is preferred?

Answer

MarkPflug picture MarkPflug · Aug 13, 2012

new Guid() makes an "empty" all-0 guid (00000000-0000-0000-0000-000000000000 is not very useful).

Guid.NewGuid() makes an actual guid with a unique value, what you probably want.