FileShare Enum descriptions are incorrect/misleading #10572
Labels
area-System.IO
Pri3
Indicates issues/PRs that are low priority
untriaged
New issue has not been triaged by the area owner
Type of issue
Other (describe below)
Description
The enum values state/imply that the effect is applied on "subsequent opening of the file". This is not correct because the value can cause the current file open request to fail based on previously opened file handles.
For example, the FileShare.Read value states the following:
In the code below, the second attempt to open the file will fail because it is specifying FileShare.Read and the previous file open request has Write access to the file.
Please update the documentation so that it is clear that the FileShare value applies to existing file handles as well as future attempts to open the file.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.io.fileshare?view=net-8.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.IO/FileShare.xml
Document Version Independent Id
3bd9dbb8-0a53-ad3f-cd5d-c18d47f7f1a1
Article author
@dotnet-bot
The text was updated successfully, but these errors were encountered: