25 lines
717 B
C#
25 lines
717 B
C#
/******************************************************************************/
|
|
/* SlunkCrypt, by LoRd_MuldeR <MuldeR2@GMX.de> */
|
|
/* 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>(T value) where T : struct, IConvertible
|
|
{
|
|
try
|
|
{
|
|
return Enum.IsDefined(typeof(T), value);
|
|
}
|
|
catch
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|