Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OpenShare Enumeration

 

Indicates how to open a file when calling file-access functions.

Namespace:   Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public enum class OpenShare

Member nameDescription
Default

LockReadWrite. This is the default.

LockRead

Other processes cannot read the file.

LockReadWrite

Other processes cannot read or write to the file.

LockWrite

Other processes cannot write to the file.

Shared

Any process can read or write to the file.

When you call file access–related functions, you can use enumeration members in your code in place of the actual values.

The OpenShare enumeration defines constants that specify whether or not other processes can access the file while your application has it open. The following table lists the OpenShare enumeration members.

When performing file I/O operations, the My.Computer.FileSystem object provides greater performance and ease of use than legacy file I/O methods. For more information, see FileSystem object.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft