Appspotdemo.Mono.Droid.StringHelperClass.GetSBytesForEncoding C# (CSharp) Method

GetSBytesForEncoding() private static method

private static GetSBytesForEncoding ( System encoding, string s ) : byte[]
encoding System
s string
return byte[]
        private static byte[] GetSBytesForEncoding(System.Text.Encoding encoding, string s)
        {
            byte[] sbytes = new byte[encoding.GetByteCount(s)];
            encoding.GetBytes(s, 0, s.Length, (byte[])(object)sbytes, 0);
            return sbytes;
        }