Console.In プロパティとは? わかりやすく解説

Console.In プロパティ

標準入力ストリーム取得します

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

Public Shared ReadOnly Property
 In As TextReader
Dim value As TextReader

value = Console.In
public static TextReader In { get;
 }
public:
static property TextReader^ In {
    TextReader^ get ();
}
/** @property */
public static TextReader get_In ()

プロパティ
標準入力ストリームを表す TextReader オブジェクト

解説解説
使用例使用例

In プロパティ使用例次に示します

Imports System
Imports System.IO

Class InTest
    
    Public Shared Sub Main()
        Dim tIn As TextReader = Console.In
        Dim tOut As TextWriter = Console.Out
        
        
        tOut.WriteLine("Hola Mundo!")
        tOut.Write("What is your name: ")
        Dim name As [String] = tIn.ReadLine()
        
        tOut.WriteLine("Buenos Dias, {0}!", name)
    End Sub 'Main
End Class 'InTest
using System;
using System.IO;

class InTest {
    public static void Main()
 {

        TextReader tIn = Console.In;
        TextWriter tOut = Console.Out;

        tOut.WriteLine("Hola Mundo!");
        tOut.Write("What is your name: ");
        String name = tIn.ReadLine();

        tOut.WriteLine("Buenos Dias, {0}!", name);
    }
}
using namespace System;
using namespace System::IO;
int main()
{
   TextReader^ tIn = Console::In;
   TextWriter^ tOut = Console::Out;
   tOut->WriteLine( "Hola Mundo!" );
   tOut->Write( "What is your name: " );
   String^ name = tIn->ReadLine();
   tOut->WriteLine( "Buenos Dias, {0}!", name );
}

import System.*;
import System.IO.*;

class InTest
{
    public static void main(String[]
 args)
    {
        TextReader tIn = Console.get_In();
        TextWriter tOut = Console.get_Out();

        tOut.WriteLine("Hola Mundo!");
        tOut.Write("What is your name: ");

        String name = tIn.ReadLine();
        tOut.WriteLine("Buenos Dias, {0}!", name);
    } //main
} //InTest
import System;
import System.IO;

var tIn : TextReader = Console.In;
var tOut : TextWriter = Console.Out;

tOut.WriteLine("Hola Mundo!");
tOut.Write("What is your name: ");
var name : String = tIn.ReadLine();
tOut.WriteLine("Buenos Dias, {0}!", Object(name));
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からConsole.In プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からConsole.In プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からConsole.In プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「Console.In プロパティ」の関連用語

Console.In プロパティのお隣キーワード
検索ランキング

   

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



Console.In プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS