title: .NET Native GUID conversion
body: <p>I have an external database that is feeding information to me. One saves their data as native GUID format and my other data source supplies standard .NET GUID format string.</p>
  
  <p>Is there a tidy way to convert from Native GUID to <a href="http://msdn.microsoft.com/en-us/library/system.guid.aspx" rel="nofollow">GUID Structure</a>?</p>
  
  <p>Also is there any validation bit to determine if a provided value is a Native GUID or not? I can't seem to find any if there is one.</p>
  
  <p>The difference is as follows:</p>
  
  <pre><code>typedef struct _GUID 
  {  
     DWORD Data1;  
     WORD Data2;  
     WORD Data3;  
     BYTE Data4[8];
  } GUID;
  </code></pre>
  
  <p>Data1, Data2 and Data3 get their byte order reversed but Data4 remains the same, see <a href="http://en.wikipedia.org/wiki/Globally_unique_identifier" rel="nofollow">http://en.wikipedia.org/wiki/Globally_unique_identifier</a> for more info</p>