principlecsharpCritical
Guid.NewGuid() vs. new Guid()
Viewed 0 times
newguidnewguid
Problem
What's the difference between
Which one is preferred?
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.