Method AsString
AsString(Byte[])
Returns a string created by converting buffer
to UTF8 characters.
Declaration
public static string AsString(this byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The byte array to convert. |
Returns
Type | Description |
---|---|
System.String | Returns a System.String. |
AsString(Byte[], Encoding)
Returns a string created by converting buffer
to a string using the specified encoding.
Declaration
public static string AsString(this byte[] buffer, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The byte array to convert. |
System.Text.Encoding | encoding | The text encoding used to convert the buffer to a string. |
Returns
Type | Description |
---|---|
System.String | Returns a System.String. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |