using System;
using System.Linq;

namespace VCommon
{
    public static class EnumExtensionMethod
    {
        //REF: stackoverflow.com/a/4171296/2430943 + R#
        public static Enum[] GetFlags(this Enum input) => Enum.GetValues(input.GetType()).Cast<Enum>().Where(input.HasFlag).ToArray();
    }
}
