string fileExtension = args.FileName.Split('.').GetValue(args.FileName.Split('.').Length - 1).ToString();
string fileExtension = System.IO.Path.GetExtension(fileName);
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.