FileShare Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains constants for controlling the kind of access other IsolatedStorageFileStream objects can have to the same file.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

Syntax

'Declaration
<FlagsAttribute> _
<ComVisibleAttribute(True)> _
Public Enumeration FileShare
[FlagsAttribute]
[ComVisibleAttribute(true)]
public enum FileShare

Members

Member name Description
Supported by Silverlight for Windows PhoneSupported by Xbox 360 None Declines sharing of the current file. Any request to open the file (by this process or another process) will fail until the file is closed.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Read Allows subsequent opening of the file for reading. If this flag is not specified, any request to open the file for reading (by this process or another process) will fail until the file is closed.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Write Allows subsequent opening of the file for writing. If this flag is not specified, any request to open the file for writing (by this process or another process) will fail until the file is closed.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 ReadWrite Allows subsequent opening of the file for reading or writing. If this flag is not specified, any request to open the file for reading or writing (by this process or another process) will fail until the file is closed.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Delete Allows subsequent deleting of a file.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Inheritable Makes the file handle inheritable by child processes.

Remarks

Specify a FileShare parameter or the IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) constructor overload.

The FileShare enumeration is not fully supported on a Macintosh computer.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources