I am wondering in which case .Net will lock the file when one use FileStream or similar mechanism?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure what you mean by “lock the file”, but when stream initialized using:
None– Declines sharing of the current file. Any request to open the file (by this process or another process) will fail until the file is closed.Check out MSDN FileShare Enumeration page which contains a detailed description for each share mode.