The addition of TryParse methods in .NET 2.0 was a welcome addition to many types. Unfortunately, the Guid structure is not among those with the addition. I found a blog post here from Colin Bowern with an implementation of a TryParse method for Guids that uses a regular expression to validate whether a string is a valid Guid.
0 comments: (+add yours?)
Post a Comment