Class Encode
It is a module that redraws the (System.Text.Encoding) syntax
Inheritance
System.Object
Encode
Namespace: Netly.Core
Assembly: Netly.Core.dll
Syntax
public static class Encode : object
Properties
Default
Is the default (generic) encoder used when encoding is not specified
Declaration
public static Encode.Mode Default { get; set; }
Property Value
| Type | Description |
|---|---|
| Encode.Mode |
Methods
GetBytes(String)
Convert value to bytes
Declaration
public static byte[] GetBytes(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | Value |
Returns
| Type | Description |
|---|---|
| System.Byte[] | Return value converted to bytes |
GetBytes(String, Encode.Mode)
Convert value to bytes
Declaration
public static byte[] GetBytes(string value, Encode.Mode encode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | Value |
| Encode.Mode | encode | Encode method |
Returns
| Type | Description |
|---|---|
| System.Byte[] | Return value converted to bytes |
GetString(Byte[])
Convert value to string
Declaration
public static string GetString(byte[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | value | Value |
Returns
| Type | Description |
|---|---|
| System.String | Return value converted to string |
GetString(Byte[], Encode.Mode)
Convert value to string
Declaration
public static string GetString(byte[] value, Encode.Mode encode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | value | Value |
| Encode.Mode | encode | Encode method |
Returns
| Type | Description |
|---|---|
| System.String | Return value converted to string |