/******************************************************************************/ /* SlunkCrypt, by LoRd_MuldeR */ /* This work has been released under the CC0 1.0 Universal license! */ /******************************************************************************/ using System; namespace com.muldersoft.slunkcrypt.gui.utils { public static class EnumHelper { public static bool IsDefined(T value) where T : struct, IConvertible { try { return Enum.IsDefined(typeof(T), value); } catch { return false; } } } }