Class QrOptions
Represents the options for a QR code, including error correction level, version, and character encoding.
Inheritance
Namespace: IronQr
Assembly: IronQr.dll
Syntax
public sealed class QrOptions : ValueType
Constructors
QrOptions(QrEncoding, QrErrorCorrectionLevel, Nullable<Int32>, String)
Initializes a new instance of the QrOptions struct with specified QR encoding, error correction level, version, and character encoding.
Declaration
public QrOptions(QrEncoding encoding, QrErrorCorrectionLevel errorCorrectionLevel, Nullable<int> version = null, string characterEncoding = "ISO-8859-1")
Parameters
| Type | Name | Description |
|---|---|---|
| QrEncoding | encoding | Encoding type of the QR. Defaults to regular QR code. |
| QrErrorCorrectionLevel | errorCorrectionLevel | The error correction or fault tolerance level of the QR code. Defaults to the highest level. |
| System.Nullable<System.Int32> | version | The symbol version of the QR code from 1-40. Defaults to null, which automatically assigns an appropriate version. |
| System.String | characterEncoding | The character encoding for binary data. Defaults to "ISO-8859-1". |
QrOptions(QrErrorCorrectionLevel, Nullable<Int32>, String)
Initializes a new instance of the QrOptions struct with specified error correction level, version, and character encoding.
Declaration
public QrOptions(QrErrorCorrectionLevel errorCorrectionLevel, Nullable<int> version = null, string characterEncoding = "ISO-8859-1")
Parameters
| Type | Name | Description |
|---|---|---|
| QrErrorCorrectionLevel | errorCorrectionLevel | The error correction or fault tolerance level of the QR code. Defaults to the highest level. |
| System.Nullable<System.Int32> | version | The symbol version of the QR code from 1-40. Defaults to null, which automatically assigns an appropriate version. |
| System.String | characterEncoding | The character encoding for binary data. Defaults to "ISO-8859-1". |
Properties
CharacterEncoding
The default character encoding for binary data.
Declaration
public string CharacterEncoding { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Encoding
The encoding type of the QR.
Declaration
public QrEncoding Encoding { get; set; }
Property Value
| Type | Description |
|---|---|
| QrEncoding |
ErrorCorrectionLevel
The error correction or fault tolerance level of a QR code. A higher QrErrorCorrectionLevel creates more complex QR codes, which are less prone to reading errors. They may also be readable if damaged or partially obscured.
Declaration
public QrErrorCorrectionLevel ErrorCorrectionLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| QrErrorCorrectionLevel |
Version
The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended).
Higher version numbers generate a more complex graphic and can encode more data. Lower version numbers generate simpler QR codes that may be more readable at a distance.
Declaration
public Nullable<int> Version { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |