A. var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);
B. var fs = File.Open(Filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
C. var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read, FileShare.Write);
D. var fs = File.ReadAllLines(Filename);
E. var fs = File.ReadAllBytes(Filename);
FileMode.OpenOrCreate - Specifies that the operating system should open a file if it exists;
otherwise, a new file should be created. If the file is opened with FileAccess.Read,
FileIOPermissionAccess.Read permission is required. If the file access is FileAccess.Write,
FileIOPermissionAccess.Write permission is required. If the file is opened with
FileAccess.ReadWrite, both FileIOPermissionAccess.Read and
FileIOPermissionAccess.Write permissions are required.
FileShare.ReadWrite - 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.