InvalidUTF16Exception

Summary

Represents an exception for an invalid UTF-16 byte sequence.

Description

Represents an exception for an invalid UTF-16 byte sequence.

Examples

Example of how this exception might be encountered
1
2
3
4
5
6
7
8
9
10
11
import System;
import System.Exceptions;
import System.Encoding;
 
try {
    byte[] encoded = [ 0xFF, 0xFE, 0xAC ];
    string decoded = UTF16.decode(encoded);
}
catch(InvalidUTF16Exception e) {
    Console.error(e);
}

Methods

Share

HTML | BBCode | Direct Link