Files
mono/mcs/class/System.IO.Compression/SharpCompress/EnumExtensions.cs
T
Joao Matos d4c8e67b63 Added SharpCompress Zip archive implementation.
This copy is based on our own fork at mono/sharpcompress.
2014-05-19 22:24:37 +01:00

15 lines
334 B
C#

using System;
namespace SharpCompress
{
internal static class EnumExtensions
{
public static bool HasFlag(this Enum enumRef, Enum flag)
{
long value = Convert.ToInt64(enumRef);
long flagVal = Convert.ToInt64(flag);
return (value & flagVal) == flagVal;
}
}
}