title: Dump GUID structure?
body: <p>The GUID structure apparently looks like <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931%28v=vs.85%29.aspx" rel="nofollow">this</a>:</p>
  
  <pre><code>typedef struct _GUID {
    DWORD Data1;
    WORD  Data2;
    WORD  Data3;
    BYTE  Data4[8];
  } GUID;
  </code></pre>
  
  <p>How can I see what those DWORD/WORD/BYTE values are? I'm trying to spit them out <a href="http://ideone.com/AfK0wg" rel="nofollow">using C#</a> but I don't know how to print them.</p>
  
  <p>I don't care if this is done in C, C# or whatever language, I think Microsoft uses the same structure under the hood. I just need to be able to see the structure so I can debug my PHP script that needs to read these things. I don't have access to Visual Studio right now (I'm on Ubuntu).</p>
  
  <hr>
  
  <p>How is this "too broad"? I'll make it more specific: given the GUID with hex representation <code>E20A9380-FD55-BCA5-9037-451C9D86E949</code> and binary representation <code>new byte[]{0x80,0x93,0x0a,0xe2,0x55,0xfd,0xa5,0xbc,0x90,0x37,0x45,0x1c,0x9d,0x86,0xe9,0x49}</code> I would like to know which of those bytes correspond to <code>Data1</code>, <code>Data2</code> and <code>Data3</code> and what their numeric values are.</p>
  
  <p>The hyperlink above shows my attempt:</p>
  
  <pre><code>public static void Main()
  {
      var guid = new Guid("E20A9380-FD55-BCA5-9037-451C9D86E949");
      Console.WriteLine(guid);
      PrintObj(guid);
  }
  
  
  public static void PrintObj(object obj)
  {
      foreach(PropertyDescriptor descriptor in TypeDescriptor.GetProperties(obj))
      {
          string name=descriptor.Name;
          object value=descriptor.GetValue(obj);
          Console.WriteLine("{0}={1}",name,value);
      }
  }
  </code></pre>
  
  <p>But it doesn't print anything. Those aren't readable properties I guess.</p>