Rebel.Cms.Web.FileExtensions.IsImage C# (CSharp) Метод

IsImage() публичный статический Метод

public static IsImage ( this file ) : bool
file this
Результат bool
        public static bool IsImage(this File file)
        {
            if (file == null) return false;
            return (",.jpeg,.jpg,.gif,.bmp,.png,.tiff,.tif,")
                .IndexOf("," + Path.GetExtension(file.Name) + ",", StringComparison.InvariantCultureIgnoreCase) > -1;
        }