IntroductionIn this snippet, I will explain about new parse method for GUID in .NET Framework 4.0. In earlier version of .NET framework we don’t have Guid.Parse method.Now we have an Guid.Parse method in .NET Framework and it’s work like any parse method.Let’s see it by an example. Let’s create console application for that. C# code class Program
{
static void Main(string[] args)
{
string newID = "f718943d-757d-4975-947b-3dbff1205be6";
Guid myGuId = Guid.Parse(newID);
Console.WriteLine(myGuId.ToString());
Console.ReadLine();
}
}and as expected here is the out put for that. That’s is it’s cool.Happy programming. |