title: Convert byte[] or object to GUID
body: <p>I assigned some value to object data type like, </p>
  
  <pre><code>object objData =dc.GetDirectoryEntry().Properties["objectGUID"].Value;
  </code></pre>
  
  <p>this object retun the value like <code>{byte[16]}
      [0]: 145
      [1]: 104
      [2]: 117
      [3]: 139
      [4]: 124
      [5]: 15
      [6]: 255
      [7]: 68
      [8]: 142
      [9]: 159
      [10]: 208
      [11]: 102
      [12]: 148
      [13]: 157
      [14]: 179
      [15]: 75</code></p>
  
  <p>Then i casting this object to byte[], like</p>
  
  <pre><code>byte[] binaryData = objData as byte[];
  </code></pre>
  
  <p>It will also return like, 
   <code>{byte[16]}
      [0]: 145
      [1]: 104
      [2]: 117
      [3]: 139
      [4]: 124
      [5]: 15
      [6]: 255
      [7]: 68
      [8]: 142
      [9]: 159
      [10]: 208
      [11]: 102
      [12]: 148
      [13]: 157
      [14]: 179
      [15]: 75</code></p>
  
  <p>Then i convert the hex values from byte[] like, </p>
  
  <pre><code>string strHex = BitConverter.ToString(binaryData);
  </code></pre>
  
  <p>It will be return like <code>**91-68-75-8B-7C-0F-FF-44-8E-9F-D0-66-94-9D-B3-4B**</code>..
  But i need the output like GUID format, How can i achieve this?</p>