Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Showing posts with label C# GUID. Show all posts
Showing posts with label C# GUID. Show all posts

Saturday, August 15, 2009

How to Create GUID from a String

This is an easy way, but esoteric task, to create a GUID from a string:


Guid g = new Guid(string);

Reference: http://www.devnewsgroups.net/dotnetframework/t2650-convert-string-guid.aspx

Friday, April 25, 2008

Creating a GUID from scatch

Sometimes you might want a psuedo-random string value. This can be done with:
System.Guid.NewGuid().ToString();