title: c# byte array size
body: <p>I'm using dll for cryptography(des) which written by someone.Dll includes encrypt,decyrpt class,and that classes includes methods.Des required 8 bytes(64 bit) key.I describes a string for key.(a character is one byte).And then encoding bytes.</p>
  
  <pre><code>        string keyText= "abcdefghsdsdfsdfsdf";
  
          UTF8Encoding encoding = new UTF8Encoding();
  
          byte[] keyfile = new byte[8];
          keyfile = UTF8Encoding.UTF8.GetBytes(keyValue);
  </code></pre>
  
  <p>above way,even though i described size of byte array 8,size  of byte array overflow,it s been length of string value.</p>
  
  <p>Any suggestion.
  Thanks.</p>