How to Get File Extension in C#/CSharp

How to Get File Extension in C#/CSharp
Rating: 5 - 1 Votes

How to Get File Extension in C#/CSharp

To get file extension in C#, we make use of GetExtension() static method of Path class, which resides in System.IO namespace.  Example is given below.