The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Encoder Constructor ()
.NET Framework (current version)
Initializes a new instance of the Encoder class.
Assembly: mscorlib (in mscorlib.dll)
To obtain an instance of an implementation of this class, the application should use the GetEncoder method of an Encoding implementation.
The following example demonstrates two techniques for initializing a new Encoder instance.
using namespace System; using namespace System::Text; int main() { // An Encoder is obtained from an Encoding. UnicodeEncoding^ uni = gcnew UnicodeEncoding; Encoder^ enc1 = uni->GetEncoder(); // A more direct technique. Encoder^ enc2 = Encoding::Unicode->GetEncoder(); // enc1 and enc2 seem to be the same. Console::WriteLine( enc1 ); Console::WriteLine( enc2 ); // Note that their hash codes differ. Console::WriteLine( enc1->GetHashCode() ); Console::WriteLine( enc2->GetHashCode() ); } /* This code example produces the following output. System.Text.EncoderNLS System.Text.EncoderNLS 54267293 18643596 */
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: