Determines the file extension from a full filename.
public static string GetFileType(string FilePath)
{
List<int> PeriodPostions = new List<int>();
int ExtensionStart = 0;
for (int iii = 0; iii < FilePath.Length; iii++)
{
if (FilePath[iii] == '.')
{
PeriodPostions.Add(iii);
}
}
ExtensionStart = PeriodPostions.Last();
return FilePath.Substring(ExtensionStart);
}