which one is better to use and why? I mean in which aspects these two commands differ and how? Performance, readability, ...
new FileInfo(path).Name or Path.GetFileName(path)
new FileInfo(path).Name
Path.GetFileName(path)