23 May 2011

Guid.Parse in .Net 4.0

In .net Frameword  4.0 a new Guid.Parse method is introduced which works just like any normal parse method.

class GuidTest
{
   static void Main(string[] args)
   {
       string StrId= "d668900g-467j-2357-8699-2hkiot456hj7";
       Guid ObjPriId= Guid.Parse(StrId);
       Console.WriteLine(ObjPriId.ToString());
       Console.ReadLine();
 
 
   }
}