No. No they’re not. There’s too much misinformation floating around about this issue and it’s easy to prove they’re not. Although when using Guid.NewGuid() you seem to always get a v4 UUID, this doesn’t mean that all instances of the GUID struct in C# are that way. The GUID struct is just a 128 bit integer - nothing more. This means Guid.Parse(42.ToString("00000000000000000000000000000000")) will get the C# GUID ‘00000000-0000-0000-0000-000000000042’ even though it’s not a valid v4 UUID.
ENTRY · 2021
1 MIN · PROGRAMMING
[ jl ]
← Back to writing
programming
Are C# GUIDs v4 UUIDs?
If you spotted a mistake or want to reply, send me an email.
archive since 2013
— jl