How to Get File Name from Path in C#/CSharp

How to Get File Name from Path in C#/CSharp
Rating: 5 - 1 Votes

How to Get File Name from Path in C#/CSharp

To get file name from path in C#/CSharp, we make use of GetFileName() static method of Path class, which resides in System.IO namespace.  Example is given below.