Assembly : mscorlib (dans mscorlib.dll)
SyntaxePublic 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 ()
public static function get In () : TextReader
Valeur de la propriété
TextReader qui représente le flux d'entrée standard.
NotesLe flux d'entrée standard est la valeur par défaut de cette propriété. Vous pouvez affecter un autre flux à cette propriété à l'aide de la méthode SetIn.
ExempleL'exemple suivant illustre l'utilisation de la propriété 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));
Plates-formesWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile pour Pocket PC, Windows Mobile pour Smartphone, Windows Server 2003, Windows XP Édition Media Center, Windows XP Professionnel Édition x64, Windows XP SP2, Windows XP Starter Edition
Le .NET Framework ne prend pas en charge toutes les versions de chaque plate-forme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise.
Informations de version
Outils (masquer)
S'enregistrer
Liste des Membres
Qui est en ligne?
FAQ