NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Console.SetIn

Redirects Console.In to the specified TextReader. By default, Console.In is set to the system's standard input stream.

[Visual Basic]
Public Shared Sub SetIn( _
   ByVal newIn As TextReader _
)
[C#]
public static void SetIn(
   TextReader newIn
);
[C++]
public: static void SetIn(
   TextReader* newIn
);
[JScript]
public static function SetIn(
   newIn : TextReader
);

Parameters

newIn
The new standard input stream.

Exceptions

Exception Type Condition
ArgumentException newIn is null.
SecurityException The caller does not have SystemStreamsPermission to set the standard error stream.

Remarks

A StreamReader that encapsulates a FileStream can be used to receive input from a file. The caller must have SystemStreamsPermission to set the standard input stream.

See Also

Console Class | Console Members | System Namespace