I have an *.exe file in \\ProgramFiles(x86)\\MyAppFolder.
In x86 application I check if the file exists (64 bit system). simple:
bool fileExists = File.E
This is about the only difference and it has more to do with the nature of FileInfo
:
FileInfo fileInfo = new FileInfo("myFile.txt"); // non-existent file
Console.WriteLine(fileInfo.Exists); // false
File.Create("myFile.txt");
Console.WriteLine(File.Exists("myFile.txt")); // true
Console.WriteLine(fileInfo.Exists); // false
So as you can see the value of fileInfo.Exists
is cached the first time you use it.
Other than that, they do the same thing behind the scenes.