File.Delete() versus FileInfo.Delete()

Tim Coker picture Tim Coker · Oct 14, 2011 · Viewed 10.3k times · Source

Is there much of a difference between using the static methods of the File object as opposed to creating a new FileInfo object and calling those methods?

Answer

CodeNaked picture CodeNaked · Oct 14, 2011

The only difference is that File must resolve the specified path (assuming it is relative), while the FileInfo should have already have the resolved path.