Opens the file with the given name, access and sharing strategy.

C# | Visual Basic | Managed C++ |
IFile OpenFile ( string name, FileMode mode, FileAccess access, FileShare share )
Function OpenFile ( _ name As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare _ ) As IFile
IFile^ OpenFile ( String^ name, FileMode mode, FileAccess access, FileShare share )

- name (String)
- The name of the file to open.
- mode (FileMode)
- The opening mode.
- access (FileAccess)
- The access mode.
- share (FileShare)
- The sharing strategy.

The file.