What is the .NET type that is used to store SQL Server's unique identifier?
If it is an SqlGuid struct, you can simply use the provided explicit conversion operator :
tmp.GlobalIdentifier = (Guid)(SqlGuid)row["GlobalIdentifier"];
If you are using a string that Guid
can accept, then you can simply use the Guid
constructor overload, which accepts the string, as others have mentioned.
source share