Creates a new instance of the StreamReader class on the specified path.
[Visual Basic] Overloads Public Sub New( _ ByVal path As String _ ) [C#] public StreamReader( string path ); [C++] public: StreamReader( String* path ); [JScript] public function StreamReader( path : String );
Exception Type | Condition |
---|---|
ArgumentException | path is an empty string (""). |
ArgumentNullException | path is null. |
FileNotFoundException | The file cannot be found. |
The complete file path is specified by path. The default character encoding and default buffer size are used.
StreamReader Class | StreamReader Members | System.IO Namespace | StreamReader Constructor Overload List