Skip to content

Commit 6bbcc38

Browse files
authored
Add Enum.HasFlag (#112)
1 parent 055d164 commit 6bbcc38

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

nanoFramework.CoreLibrary/System/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
[assembly: AssemblyProduct("nanoFramework mscorlib")]
1515
[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and Contributors")]
1616

17-
[assembly: AssemblyNativeVersion("100.5.0.1")]
17+
[assembly: AssemblyNativeVersion("100.5.0.2")]

nanoFramework.CoreLibrary/System/Enum.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System
810
{
911
/// <summary>
@@ -12,6 +14,14 @@ namespace System
1214
[Serializable]
1315
public abstract class Enum : ValueType
1416
{
17+
/// <summary>
18+
/// Determines whether one or more bit fields are set in the current instance.
19+
/// </summary>
20+
/// <param name="flag">An enumeration value.</param>
21+
/// <returns><see langword="true"/> if the bit field or bit fields that are set in flag are also set in the current instance; otherwise, <see langword="false"/>.</returns>
22+
/// <exception cref="ArgumentException"><paramref name="flag"/> is a different type than the current instance.</exception>
23+
[MethodImpl(MethodImplOptions.InternalCall)]
24+
public extern bool HasFlag(Enum flag);
1525

1626
/// <summary>
1727
/// Converts the value of this instance to its equivalent string representation.

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "1.9.0-preview.{height}",
3+
"version": "1.9.1-preview.{height}",
44
"assemblyVersion": {
55
"precision": "revision"
66
},

0 commit comments

Comments
 (0)