How to convert Guid to string and String to Guid..?
hi, could anyone post some example codes for conversion between GUID and String and also conversion string to GUID..?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

osama handoumeh3 reputationPosted Jul 23, 2012, 12:57 AM EDT
string s ;
Guid g = Guid.NewGuid();
s= g.ToString();
//////
from string to guid :
g= new Guid(s);
but the string must be in the same format as Guid (00000000-0000-0000-0000-000000000000)
VulpesRank #55 · 29.2K reputationPosted Jul 23, 2012, 1:12 AM EDT
For details, check these links:
http://msdn.microsoft.com/en-us/library/96ff78dc.aspx
http://msdn.microsoft.com/en-us/library/97af8hh4.aspx