I need to format my GUIDs in the dashed format, all uppercase. I know using myGuid.ToString("D") or String.Format("{0:D}", myGuid) gives the dashed format, but using an uppercase D as opposed to a lower-case d doesn’t give me an uppercased GUID like I thought it would. Is there a way to do this without doing anything crazy, or do I just need to call myGuid.ToString().ToUpper()?
I need to format my GUIDs in the dashed format, all uppercase. I know
Share
Yep. You could go to the effort of creating a custom IFormatProvider, but it doesn’t seem worth it here.