Decoder コンストラクタとは? わかりやすく解説

Decoder コンストラクタ

Decoder クラス新しインスタンス初期化します。

名前空間: System.Text
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説
使用例使用例

次のコード例は、新し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
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());
    }
}
using namespace System;
using namespace System::Text;
int main()
{
   
   // A Decoder is obtained from an Encoding.
   UnicodeEncoding^ uni = gcnew 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() );
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Decoder コンストラクタ」の関連用語

Decoder コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Decoder コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS