private static GetSBytesForEncoding ( System encoding, string s ) : byte[] | ||
encoding | System | |
s | string | |
Результат | 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;
}