Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
 IsolatedStorageFileStream Construct...
.NET Framework Class Library for Silverlight
IsolatedStorageFileStream Constructor (String, FileMode, FileAccess, FileShare, IsolatedStorageFile)
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Initializes a new instance of the IsolatedStorageFileStream class giving access to the file designated by path, in the specified mode, with the specified file access, using the file sharing mode specified by share, and in the context of the IsolatedStorageFile specified by isf.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

Visual Basic (Declaration)
Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    share As FileShare, _
    isf As IsolatedStorageFile _
)
Visual Basic (Usage)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim share As FileShare
Dim isf As IsolatedStorageFile

Dim instance As New IsolatedStorageFileStream(path, mode, _
    access, share, isf)
C#
public IsolatedStorageFileStream(
    string path,
    FileMode mode,
    FileAccess access,
    FileShare share,
    IsolatedStorageFile isf
)
Visual C++
public:
IsolatedStorageFileStream(
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    IsolatedStorageFile^ isf
)
JScript
public function IsolatedStorageFileStream(
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    share : FileShare, 
    isf : IsolatedStorageFile
)

Parameters

path
Type: System..::.String

The relative path of the file within isolated storage.

mode
Type: System.IO..::.FileMode

One of the FileMode values.

access
Type: System.IO..::.FileAccess

A bitwise combination of the FileAccess values.

share
Type: System.IO..::.FileShare

A bitwise combination of the FileShare values.

isf
Type: System.IO.IsolatedStorage..::.IsolatedStorageFile

The IsolatedStorageFile in which to open the IsolatedStorageFileStream.

ExceptionCondition
IsolatedStorageException

isf has been removed.

ArgumentException

path is badly formed.

ArgumentNullException

path is nullNothingnullptra null reference (Nothing in Visual Basic).

-or-

isf is nullNothingnullptra null reference (Nothing in Visual Basic).

DirectoryNotFoundException

The directory in path does not exist.

FileNotFoundException

No file was found and the mode is set to Open.

ObjectDisposedException

isf has been disposed.

The mode parameter indicates whether a new file should be created or an existing one used. The access parameter includes read-only, read/write, and write-only.

Caution:

When you compile a set of characters with a particular cultural setting and retrieve those same characters with a different cultural setting, the characters might not be interpretable, and can cause an exception to be thrown.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker