string path = @"F:\MyTest.txt"; if (!File.Exists(path)) { // Create a file to write to. using (StreamWriter sw = File.CreateText(path)) { sw.WriteLine("Hello"); sw.WriteLine("And"); sw.WriteLine("Welcome"); } }
[FileSecurityState_OperationNotPermitted] Arguments: F:\MyTest.txt Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.60401.00&File=mscorlib.dll&Key=FileSecurityState_OperationNotPermitted
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)