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!

File.OpenRead (String)

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;

Parameters

path
The path of the new FileStream object.

Return Value

A reference to a new read-only Stream object on the specified path.

Exceptions

Exception Type Condition
SecurityException The caller does not have the required permission.
ArgumentException path is empty or contains only whitespaces.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read permission to the path.

See Also

File Class | File Members | System.IO Namespace | File.OpenRead Overload List