Decoder コンストラクタ
Decoder クラスの新しいインスタンスを初期化します。
Protected Sub New()
[C#]
protected Decoder();
[C++]
protected: Decoder();
[JScript]
protected function Decoder();
使用例
[Visual Basic, C#, C++] 新しい Decoder インスタンスを初期化する 2 つの方法を次の例に示します。
Imports System
Imports System.Text
Class EncoderExample
Public Shared Sub Main()
' A Decoder is obtained from an Encoding.
Dim uni As New UnicodeEncoding()
Dim dec1 As Decoder = uni.GetDecoder()
' A more direct technique.
Dim dec2 As Decoder = Encoding.Unicode.GetDecoder()
' dec1 and dec2 seem to be the same.
Console.WriteLine(dec1.ToString())
Console.WriteLine(dec2.ToString())
' Note that their hash codes differ.
Console.WriteLine(dec1.GetHashCode())
Console.WriteLine(dec2.GetHashCode())
End Sub
End Class
[C#]
using System;
using System.Text;
class EncoderExample {
public static void Main() {
// A Decoder is obtained from an Encoding.
UnicodeEncoding uni = new UnicodeEncoding();
Decoder dec1 = uni.GetDecoder();
// A more direct technique.
Decoder dec2 = Encoding.Unicode.GetDecoder();
// dec1 and dec2 seem to be the same.
Console.WriteLine(dec1.ToString());
Console.WriteLine(dec2.ToString());
// Note that their hash codes differ.
Console.WriteLine(dec1.GetHashCode());
Console.WriteLine(dec2.GetHashCode());
}
}
[C++]
#using <mscorlib.dll>
using namespace System;
using namespace System::Text;
int main()
{
// A Decoder is obtained from an Encoding.
UnicodeEncoding* uni = new UnicodeEncoding();
Decoder * dec1 = uni -> GetDecoder();
// A more direct technique.
Decoder * dec2 = Encoding::Unicode -> GetDecoder();
// dec1 and dec2 seem to be the same.
Console::WriteLine(dec1);
Console::WriteLine(dec2);
// Note that their hash codes differ.
Console::WriteLine(dec1 -> GetHashCode());
Console::WriteLine(dec2 -> GetHashCode());
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard