I have the problem with deleting or writing in files. The problem isn't in file security or just to lunch VS like admin beacause i've tried it but it didn't help. Error is: System.UnauthorizedAccessException and code is 0xc000013a.
static void Main(string[] args)
{
string path = @"C:\Users\Asus\Desktop\abcd.txt";
if (File.Exists(path))
{
File.Delete(path);
}
else
{
Console.WriteLine("Doesnt exists");
}
}