Check out example codes for "c# get file extension". It will help you in understanding the concepts better.

Code Example 1

string myFilePath = @"C:\MyFile.txt";
string ext = Path.GetExtension(myFilePath);
// ext would be ".txt"

Learn ReactJs, React Native from akashmittal.com