need to help to convert <p>Hi need help to convert this C++ code to C#</p> <pre><code>sprintf((char *)(dataBuffer), "Failed statistics read, device %s", device); </code></pre> <p>The dataBuffer is byte[]</p> <p>I wrote this, but with error converting string to byte[]</p> <pre><code> dataBuffer = string.Format("Failed statistics read, device {0}", device); </code></pre>