CSharpImageLibrary.Headers.DDS_Header.DDS_FlagStringify C# (CSharp) Method

DDS_FlagStringify() private method

private DDS_FlagStringify ( Type enumType ) : string
enumType System.Type
return string
        string DDS_FlagStringify(Type enumType)
        {
            string flags = "";

            string[] names = Enum.GetNames(enumType);
            int[] values = (int[])Enum.GetValues(enumType);
            for (int i = 0; i < names.Length; i++)
            {
                if (((int)dwFlags & values[i]) != 0)
                    flags += $"[{names[i]}] ";
            }

            return flags;
        }