Table of Contents

Method Encode

Namespace
LMKit.Graphics
Assembly
LM-Kit.NET.dll

Encode(string, ErrorCorrection)

Encodes text as a byte-mode symbol at the requested error-correction level.

public static QrCode Encode(string text, QrCode.ErrorCorrection level = ErrorCorrection.Medium)

Parameters

text string

The payload, encoded as UTF-8.

level QrCode.ErrorCorrection

The error-correction level.

Returns

QrCode

The encoded symbol.

Exceptions

ArgumentNullException

text is null.

ArgumentException

No version can hold the payload at that level.

Encode(byte[], ErrorCorrection)

Encodes raw bytes as a byte-mode symbol at the requested error-correction level.

public static QrCode Encode(byte[] data, QrCode.ErrorCorrection level = ErrorCorrection.Medium)

Parameters

data byte[]

The payload bytes.

level QrCode.ErrorCorrection

The error-correction level.

Returns

QrCode

The encoded symbol.

Exceptions

ArgumentNullException

data is null.

ArgumentException

No version can hold the payload at that level.

Share