Convert byte[] or object to GUID

前端 未结 5 1848
别那么骄傲
别那么骄傲 2021-02-12 10:20

I assigned some value to object data type like,

object objData =dc.GetDirectoryEntry().Properties[\"objectGUID\"].Value;

this object retun the

5条回答
  •  旧时难觅i
    2021-02-12 10:46

    How about using the Guid constructor which takes a byte array?

    Guid guid = new Guid(binaryData);
    

    (You can then use Guid.ToString() to get it in text form if you need to.)

提交回复
热议问题