-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
area-System.IOenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
I might be missing something obvious, but it's strange to me that this throws an IOException on Windows but not on Ubuntu:
var willWork = File.Open(myPath, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
var willThrowOnlyOnWin = File.Open(myPath, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);However, this will throw on both:
var willWork = File.Open(myPath, FileMode.Create, FileAccess.ReadWrite, **FileShare.None**);
var willThrowEverywhere = File.Open(myPath, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);Is this expected?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.IOenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions