From e512b38719e58af0285b863e177b4f699677909e Mon Sep 17 00:00:00 2001 From: josesimoes Date: Tue, 20 Oct 2020 15:13:36 +0100 Subject: [PATCH] Add Enum.HasFlag - Bump AssemblyNativeVersion to 100.5.0.2. --- nanoFramework.CoreLibrary/System/AssemblyInfo.cs | 2 +- nanoFramework.CoreLibrary/System/Enum.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nanoFramework.CoreLibrary/System/AssemblyInfo.cs b/nanoFramework.CoreLibrary/System/AssemblyInfo.cs index 4ce8becd..e753c969 100644 --- a/nanoFramework.CoreLibrary/System/AssemblyInfo.cs +++ b/nanoFramework.CoreLibrary/System/AssemblyInfo.cs @@ -14,4 +14,4 @@ [assembly: AssemblyProduct("nanoFramework mscorlib")] [assembly: AssemblyCopyright("Copyright (c) .NET Foundation and Contributors")] -[assembly: AssemblyNativeVersion("100.5.0.1")] +[assembly: AssemblyNativeVersion("100.5.0.2")] diff --git a/nanoFramework.CoreLibrary/System/Enum.cs b/nanoFramework.CoreLibrary/System/Enum.cs index 959efd9e..bf0ab526 100644 --- a/nanoFramework.CoreLibrary/System/Enum.cs +++ b/nanoFramework.CoreLibrary/System/Enum.cs @@ -4,6 +4,8 @@ // See LICENSE file in the project root for full license information. // +using System.Runtime.CompilerServices; + namespace System { /// @@ -12,6 +14,14 @@ namespace System [Serializable] public abstract class Enum : ValueType { + /// + /// Determines whether one or more bit fields are set in the current instance. + /// + /// An enumeration value. + /// if the bit field or bit fields that are set in flag are also set in the current instance; otherwise, . + /// is a different type than the current instance. + [MethodImpl(MethodImplOptions.InternalCall)] + public extern bool HasFlag(Enum flag); /// /// Converts the value of this instance to its equivalent string representation.