Converting a String to a GUID

To convert a string to a GUID, do the following:

In C#:

Guid MyGuid = new Guid(stringValue);

And in VB .NET:

Dim MyGuid As Guid = New Guid(stringValue)
 

Best Regards,

Kevin McNeish
Microsoft .NET MVP
President, Oak Leaf Enterprises, Inc.
Chief Architect of the MM .NET Application Framework

Comments

Mark Williams said:

Thanks, man. I've been searching everywhere for that!

# June 20, 2007 5:58 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)