BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 System.Enum System.Flags System.Runtime.InteropServices.ComVisible(true)

For an example of creating a file and writing text to a file, see [<topic://cpconwritingtexttofile>]. For an example of reading text from a file, see [<topic://cpconreadingtextfromfile>]. For an example of reading from and writing to a binary file, see [<topic://cpconReadingWritingToNewlyCreatedDataFile>].

A typical use of this enumeration is to define whether two processes can simultaneously read from the same file. For example, if a file is opened and is specified, other users can open the file for reading but not for writing.

A parameter is specified in some of the constructors for , , and in some of the Open methods of and to control how a file is opened.

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

- Field
  2.0.0.0
  4.0.0.0
  System.IO.FileShare

  Allows subsequent deleting of a file.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.FileShare Inheritable To be added.

  Makes the file handle inheritable by child processes. This is not directly supported by Win32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.FileShare None To be added.

  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.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.FileShare Read To be added.

  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. However, even if this flag is specified, additional permissions might still be needed to access the file.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.FileShare ReadWrite To be added.

  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. However, even if this flag is specified, additional permissions might still be needed to access the file.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.FileShare Write To be added.

  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. However, even if this flag is specified, additional permissions might still be needed to access the file.

  0
0