Class Base64Data
A Base64 data.
Inheritance
System.Object
Base64Data
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Text.Encoding
Assembly: Kephas.Core.dll
Syntax
public class Base64Data
Constructors
| Improve this Doc View SourceBase64Data(Byte[], String)
Initializes a new instance of the Base64Data class.
Declaration
public Base64Data(byte[] bytes, string mimeType = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The bytes. |
System.String | mimeType | The MIME type (optional). |
Base64Data(String)
Initializes a new instance of the Base64Data class.
Declaration
public Base64Data(string base64String)
Parameters
Type | Name | Description |
---|---|---|
System.String | base64String | The base64 string. |
Properties
| Improve this Doc View SourceBytes
Gets the bytes.
Declaration
public byte[] Bytes { get; }
Property Value
Type | Description |
---|---|
System.Byte[] | The bytes. |
MimeType
Gets the MIME type.
Declaration
public string MimeType { get; }
Property Value
Type | Description |
---|---|
System.String | The MIME type. |
Methods
| Improve this Doc View SourceFromBase64String(String)
Initializes a new Base64Data from the given Base64 string.
Declaration
public static Base64Data FromBase64String(string base64String)
Parameters
Type | Name | Description |
---|---|---|
System.String | base64String | The base64 string. |
Returns
Type | Description |
---|---|
Base64Data | A Base64Data instance representing the provided string. |
ToBase64String()
Converts this object to a Base64 string.
Declaration
public string ToBase64String()
Returns
Type | Description |
---|---|
System.String | This object as a Base64 string. |
ToBase64String(Byte[], String)
Converts the provided bytes to a base 64 string.
Declaration
public static string ToBase64String(byte[] bytes, string mimeType = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The bytes to convert. |
System.String | mimeType | The MIME type (optional). |
Returns
Type | Description |
---|---|
System.String | The given data converted to a Base64 string. |
ToBase64String(String, String)
Converts the provided plain string to a base 64 string.
Declaration
public static string ToBase64String(string plainString, string mimeType = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | plainString | The plain string to convert. |
System.String | mimeType | The MIME type (optional). |
Returns
Type | Description |
---|---|
System.String | The given string converted to a Base64 string. |