Creates a read-only FileStream on the specified path.
[Visual Basic] Overloads Public Shared Function OpenRead( _ ByVal path As String _ ) As Stream [C#] public static Stream OpenRead( string path ); [C++] public: static Stream* OpenRead( String* path ); [JScript] public static function OpenRead( path : String ) : Stream;
A reference to a new read-only Stream object on the specified path.
Exception Type | Condition |
---|---|
SecurityException | The caller does not have the required permission. |
ArgumentException | path is empty or contains only whitespaces. |
NGWS Runtime Security:
FileIOPermissionAccess | Read permission to the path. |
File Class | File Members | System.IO Namespace | File.OpenRead Overload List