C# – Get Filename From Path with Example – C# Programming Example
Basic Loops / Iteration Statement Methods

C# – Get Filename From Path with Example

In this article, we’ll learn: How to get all file name from folder in C#.

 

Path.GetFileName

Returns the file name and extension of the specified path string.

 

Step1 : Add the namespace to using

Step 2:

 

Output:

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: