public static String GetFileExtension(string fileName) { string ext = string.Empty; int x = fileName.LastIndexOf("."); if (x > 0 && x < fileName.Length) ext = H3Text.Right(fileName, fileName.Length - x - 1); return ext; }