Class EncodingUtility
This utility class is designed to make System.Text.Encoding operations easier to work with.
Inheritance
Namespace: Cuemon.Text
Assembly: Cuemon.Core.dll
Syntax
public static class EncodingUtility
Properties
| Improve this DocAsciiEncoding
Gets an encoding for the ASCII (7-bit) character set.
Declaration
public static Encoding AsciiEncoding { get; }
Property Value
Type | Description |
---|---|
System.Text.Encoding | An encoding for the ASCII (7-bit) character set. |
Methods
| Improve this DocTryParse(Byte[], out Encoding)
Tries to resolve the Unicode System.Text.Encoding object from the specified System.Byte array.
Declaration
public static bool TryParse(byte[] value, out Encoding result)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | The System.Byte array to resolve the Unicode System.Text.Encoding object from. |
System.Text.Encoding | result | When this method returns, it contains the Unicode System.Text.Encoding value equivalent to the encoding contained in |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryParse(Stream, out Encoding)
Tries to resolve the Unicode System.Text.Encoding object from the specified System.IO.Stream object.
Declaration
public static bool TryParse(Stream value, out Encoding result)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The System.IO.Stream object to resolve the Unicode System.Text.Encoding object from. |
System.Text.Encoding | result | When this method returns, it contains the Unicode System.Text.Encoding value equivalent to the encoding contained in |
Returns
Type | Description |
---|---|
System.Boolean |
|