title: Putting UTF-8 string in variable of type string
body: <p>Well, sorry about the confusing title but I'm having a slightly annoying problem with character encoding in C#.NET</p>
  
  <p>I have a bunch of classes generated from WSDL files, these classes have methods which take string parameters which are then submitted to a remote web service. This remote web service expects all text input to be UTF-8 encoded. Now, as far as I can tell there really isn't a way to make a string in C#.NET UTF-8 encoded, it's UTF-16 or nothing, if I want UTF-8 I have to make it a <code>byte[]</code>, right?</p>
  
  <p>So, my big question is, how am I supposed to put my raw UTF-8 <code>byte[]</code> data into a string so I can actually submit it to the web service? I mean, sure, I could probably fall back on C-style code, looping through the whole thing byte by byte but surely Microsoft must have thought about this when designing the language and API? (although since my Vista laptop thinks it's perfectly alright to use UTF-16 internally, cp1252 for some stuff, UTF-8 for some other and cp850(!) for some other stuff I wouldn't be too surprised if they didn't).</p>
  
  <p>So, am I stuck doing things the ugly way or is there some hidden <code>System.Text.EncodeStuffTherightWay.EncodeStringAsUTF8(string)</code> method deep in the bowels of .NET?</p>