UTF7Encoding Constructor ()
Initializes a new instance of the UTF7Encoding class.
Assembly: mscorlib (in mscorlib.dll)
This constructor creates an instance that does not allow optional characters. Calling the UTF7Encoding constructor is equivalent to calling the UTF7Encoding::UTF7Encoding(Boolean) constructor that takes an allowOptionals parameter and specifying false for that parameter.
If an instance allows optional characters, Unicode code points are encoded with a corresponding optional character instead of a modified base 64 character. The optional characters are exclamation point ("!"), backward slash ("\"), vertical line ("|"), double quote ("""), number sign ("#"), dollar sign ("$"), percent sign ("%"), ampersand ("&"), asterisk ("*"), semicolon (";"), left angle bracket ("<"), right angle bracket (">"), left curly bracket ("{"), right curly bracket ("}"), left square bracket ("["), right square bracket ("]"), equal sign ("="), at sign ("@"), circumflex accent ("^"), underscore ("_"), and grave accent ("`").
Note |
|---|
UTF7Encoding does not provide error detection. For security reasons, your applications are recommended to use UTF8Encoding, UnicodeEncoding, or UTF32Encoding and enable error detection. |
The following code example demonstrates how to create a new UTF7Encoding instance and display the name of the encoding.
Available since 10
.NET Framework
Available since 1.1
