Valid 70-483 Dumps shared by ExamDiscuss.com for Helping Passing 70-483 Exam! ExamDiscuss.com now offer the newest 70-483 exam dumps, the ExamDiscuss.com 70-483 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 70-483 dumps with Test Engine here:
You are developing an application. The application includes a method named ReadFile that reads data from a file. The ReadFile()method must meet the following requirements: It must not make changes to the data file. It must allow other processes to access the data file. It must not throw an exception if the application attempts to open a data file that does not exist. You need to implement the ReadFile()method. Which code segment should you use?
Correct Answer: A
Explanation/Reference: Explanation: 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. References: http://msdn.microsoft.com/pl-pl/library/system.io.fileshare.aspx http://msdn.microsoft.com/en-us/library/system.io.filemode.aspx