private GetBytes ( char chars, int charCount, byte bytes, int byteCount ) : int | ||
chars | char | |
charCount | int | |
bytes | byte | |
byteCount | int | |
return | int |
string str = "Hello, world!"; byte[] bytes = System.Text.ASCIIEncoding.GetBytes(str);
byte[] bytes = {72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33}; string str = System.Text.ASCIIEncoding.GetString(bytes);This example converts an array of ASCII encoded bytes into a string "Hello, world!". These code snippets demonstrate how to use the ASCIIEncoding class to encode and decode ASCII characters. This class is part of the System.Text namespace in the .NET Framework.
private GetBytes ( char chars, int charCount, byte bytes, int byteCount ) : int | ||
chars | char | |
charCount | int | |
bytes | byte | |
byteCount | int | |
return | int |