title: byte[] to string in C# .NET Core
body: <p>I have a project which is using (I assume) .NET Core. I have a library which stores securely key-pair values. The key is string and the value should be a byte[], so I have to convert the string that I want to store as byte[]:</p>
  
  <pre><code>bytes[] my_bytes = Encoding.Unicode.GetBytes(txtSomeInfo.Text)
  </code></pre>
  
  <p>The problem is when i retrieve the value, because is an byte[] array i should convert it back to string like this: </p>
  
  <pre><code>my_string = Encoding.Unicode.GetString(my_bytes)
  </code></pre>
  
  <p>I found it some answers in Stack Overflow, but... I can't use it just like that because this version of GetString method of System.Text.Encoding is asking for two additional parameters: <code>int index, and int count</code></p>
  
  <p>How can I get my string back?</p>