Html UtilsHtml Attribute Encode(Char, Int 32, Int 32, Char) Method
Encode an HTML attribute value.
Definition
Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The encoded attribute value.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static string HtmlAttributeEncode(
char[] value,
int startIndex,
int count,
char quote = '"'
)Parameters
- value Char
- The attribute value to encode.
- startIndex Int32
- The starting index of the attribute value.
- count Int32
- The number of characters in the attribute value.
- quote Char (Optional)
- The character to use for quoting the attribute value.
Return Value
StringThe encoded attribute value.
Remarks
Encodes an HTML attribute value.
Exceptions
| ArgumentNullException | value is . |
| ArgumentOutOfRangeException | startIndex and count do not specify a valid range in the value. |
| ArgumentException | quote is not a valid quote character. |