mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-03-28 21:34:54 -05:00
16 lines
361 B
C#
16 lines
361 B
C#
using System;
|
|
|
|
|
|
namespace UniJSON
|
|
{
|
|
public static class EnumExtensions
|
|
{
|
|
public static bool HasFlag(this Enum keys, Enum flag)
|
|
{
|
|
if (keys.GetType() != flag.GetType())
|
|
throw new ArgumentException("Type Mismatch");
|
|
return (Convert.ToUInt64(keys) & Convert.ToUInt64(flag)) != 0;
|
|
}
|
|
}
|
|
}
|