Guid.Parse Method in .NET Framework 4.0

No.of Views744
Bookmarked0 times
Downloads 
Votes0
By  jalpesh   On  02 Jan 2011 21:01:34
Tag : .NET Frameworks , General
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
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In 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.

Image Loading

That’s is it’s cool.Happy programming.

 
Sign Up to vote for this article
 
About Author
 
jalpesh
Occupation-Software Engineer
Company-DotNetJaps
Member Type-Expert
Location-India
Joined date-08 May 2010
Home Page-http://www.dotnetjalps.com
Blog Page-http://www.dotnetjalps.com
I am jalpesh vadgamaa an Microsoft MVP for Visual C# and BrainBench Certified ASP.NET Developer having experience of five year in Microsoft .NET Technology.I am working as Project Leader in Mid Size company.My work area comprises of Enterprise Level projects using ASP.NET and other Microsoft .NET Technologies.Please feel free to contact me for any queries via posting comments on my blog I will try to reply as early as possible.
 
 
Other popularSectionarticles
    Comments
    There is no comments for this articles.
    Leave a Reply
    Title:
    Display Name:
    Email:
    (not display in page for the security purphase)
    Website:
    Message:
    Please refresh your screen using Ctrl+F5
    If you can't read this number refresh your screen
    Please input the anti-spam code that you can read in the image.
    ^ Scroll to Top