Gets an encoding for the UTF-16 format using the little endian byte order.
Assemblies: System.Text.Encoding (in System.Text.Encoding.dll)
mscorlib (in mscorlib.dll)
For information about the encodings supported by the .NET Framework and a discussion of which Unicode encoding to use, see Character Encoding in the .NET Framework.
The UnicodeEncoding object that is returned by this property may not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with a question mark ("?") character. Instead, you can call the UnicodeEncoding.UnicodeEncoding(Boolean, Boolean, Boolean) constructor to instantiate a little endian UnicodeEncoding object whose fallback is either an EncoderFallbackException or a DecoderFallbackException, as the following example illustrates.