示例#1
0
 /// <summary>
 /// Indicates if <paramref name="x"/> equals <paramref name="y"/> without boxing the values.
 /// </summary>
 /// <param name="x">The first enum value.</param>
 /// <param name="y">The second enum value.</param>
 /// <returns>Indication if <paramref name="x"/> equals <paramref name="y"/> without boxing the values.</returns>
 public new bool Equals(object?x, object?y) => x is object?(y is object && _enumCache.Equals(x, y)) : y is null;
示例#2
0
 /// <summary>
 /// Indicates if <paramref name="x"/> equals <paramref name="y"/> without boxing the values.
 /// </summary>
 /// <param name="x">The first enum value.</param>
 /// <param name="y">The second enum value.</param>
 /// <returns>Indication if <paramref name="x"/> equals <paramref name="y"/> without boxing the values.</returns>
 public bool Equals(TEnum x, TEnum y) => s_cache.Equals(ref UnsafeUtility.As <TEnum, byte>(ref x), ref UnsafeUtility.As <TEnum, byte>(ref y));