C#

Convert String to GUID

Sometime , we need store GUID as string. But how to convert string to GUID. Just do like below: var guid = new GUID(yourStringGUID). the wrong way is :  var guid = (GUID)yourStringGuid.