Created
August 17, 2017 03:35
-
-
Save kkbruce/194ba6e1632be1ba0c4955e0ccbe669a to your computer and use it in GitHub Desktop.
List GUID string formats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For LINQPad use | |
| // 32 digits | |
| // ex: 4af8654b1c8142c793f47f9f33c6e883 | |
| Guid.NewGuid().ToString("N").Dump("N"); | |
| // 32 digits separated by hyphens | |
| // ex: d197f0ba-797f-49d2-bdf3-883486f29a31 | |
| Guid.NewGuid().ToString("D").Dump("D"); | |
| // 32 digits separated by hyphens, enclosed in braces | |
| // ex: {084e6c10-de4c-49ff-b6fd-54c45fcacbfd} | |
| Guid.NewGuid().ToString("B").Dump("B"); | |
| // 32 digits separated by hyphens, enclosed in parentheses | |
| // ex: (48c5a44a-e7f5-4045-ae4f-6a1c8917bff9) | |
| Guid.NewGuid().ToString("P").Dump("P"); | |
| // Four hexadecimal values enclosed in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in brace | |
| // ex: {0xeef5520c,0xa363,0x4c99,{0xbb,0x07,0x71,0xa8,0x18,0x37,0xc2,0x59}} | |
| Guid.NewGuid().ToString("X").Dump("X"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment