title: Equivalent of getBytes() in Java to C#
body: <p>I want to convert a class which is in Java to C#, most of the changes are done already but I have this part which I am not really sure about. I want to convert this line of code:</p>
  
  <pre><code>byte[] arrayOfByte1 = paramString.getBytes();
  </code></pre>
  
  <p>I have tried this: </p>
  
  <pre><code>byte[] arrayOfByte1 = BitConverter.GetBytes(paramString);
  </code></pre>
  
  <p>But it does not work as GetBytes() is expecting a double. I am not sure if just converting it to a double would solve the issue, so I wanted to ask about it here.</p>