Convert byte[] or object to GUID

前端 未结 5 2306
一个人的身影
一个人的身影 2021-02-12 10:27

I assigned some value to object data type like,

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

this object retun the

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-12 11:01

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

提交回复
热议问题