diff --git a/nanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeFeature.cs b/nanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeFeature.cs
index a5f408a5..8d1bdf58 100644
--- a/nanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeFeature.cs
+++ b/nanoFramework.CoreLibrary/System/Runtime/CompilerServices/RuntimeFeature.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Runtime.CompilerServices
@@ -13,17 +13,22 @@ public static partial class RuntimeFeature
///
public const string DefaultImplementationsOfInterfaces = nameof(DefaultImplementationsOfInterfaces);
+ ///
+ /// Represents a runtime feature where byref-like types can be used in Generic parameters.
+ ///
+ public const string ByRefLikeGenerics = nameof(ByRefLikeGenerics);
+
///
/// Checks whether a certain feature is supported by the Runtime.
///
public static bool IsSupported(string feature)
{
- if (feature == DefaultImplementationsOfInterfaces)
+ return feature switch
{
- return true;
- }
-
- return false;
+ ByRefLikeGenerics or
+ DefaultImplementationsOfInterfaces => true,
+ _ => false,
+ };
}
}
}