CSharpImageLibrary.ImageFormats.GetSupportedExtensionsForDialogBox C# (CSharp) Method

GetSupportedExtensionsForDialogBox() public static method

Get list of filter strings for dialog boxes of the Supported Images.
public static GetSupportedExtensionsForDialogBox ( ) : List
return List
        public static List<string> GetSupportedExtensionsForDialogBox()
        {
            List<string> filters = new List<string>();
            var names = GetSupportedExtensions();

            // All supported
            filters.Add("All Supported|*." + String.Join(";*.", names));

            foreach (var name in names)
            {
                var enumValue = (SupportedExtensions)Enum.Parse(typeof(SupportedExtensions), name);
                var desc = UsefulThings.General.GetEnumDescription(enumValue);

                filters.Add($"{desc}|*.{name}");
            }
            return filters;
        }