protected string CheckImageConsistencyAndGetName(params string[] strings)
{
string str = null;
string a = null;
foreach (string str3 in strings)
{
if (!string.IsNullOrEmpty(str3))
{
if (str == null)
{
str = str3;
a = Path.GetExtension(str3);
}
else if (!string.Equals(a, Path.GetExtension(str3), StringComparison.InvariantCultureIgnoreCase))
{
throw new Exception(string.Format("Inconsistency between images in the same group ({0}). All images should be either PNG or JPEG!", str));
}
}
}
return str;
}