HiveBrain v1.2.0
Get Started
← Back to all entries
principlecsharpCritical

Guid.NewGuid() vs. new Guid()

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
newguidnewguid

Problem

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

Which one is preferred?

Solution

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.

Context

Stack Overflow Q#11938151, score: 702

Revisions (0)

No revisions yet.