title: Converting different registry value types to string?
body: <p>im traversing through the registry, taking the values of the keys and storing them as strings. I have discovered there are many different types. Some of these types are causing my filestream writer to fail. Is it possible to convert all of the below into a string form. The actual data value is not important, just the ability to differentiate between different values.</p>
  
  <ul>
  <li>DWORD</li>
  <li>ExpandString</li>
  <li>Binary (is this just the same as byte[] ?)</li>
  <li>MultiString</li>
  </ul>
  
  <p>-</p>
  
  <pre><code>if (String.Compare(SubKey.GetValueKind(v[i]).ToString(), "String") == 0)
  {
      String s = SubKey.GetValue(v[i]).ToString();
  
      RegistryKeyDataValue rkdv = new RegistryKeyDataValue(s); 
      rkdv.incrementNumberOfTimesUsed();
      rkdv.setTypeOfData("S");
  
      r.addDataValue(rkdv);
      r.setCurrentDataValue(s);
  
      String hash = "";
      h.setHashData(hash); 
  
      hash = h.HashString(s);
  }
  </code></pre>
  
  <p>I'm having problems later on because i want to write the values to a file and i need to convert all different types to a string.</p>