You need to use an encoding (System.Text.Encoding) to tell .NET what you expect as the output. For example, in UTF-16 (= System.Text.Encoding.Unicode):
var result = System.Text.Encoding.Unicode.GetBytes(text);
You need to use an encoding (System.Text.Encoding) to tell .NET what you expect as the output. For example, in UTF-16 (= System.Text.Encoding.Unicode):
var result = System.Text.Encoding.Unicode.GetBytes(text);