File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
nanoFramework.CoreLibrary/System/Runtime/CompilerServices Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- // Licensed to the .NET Foundation under one or more agreements.
1+ // Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the MIT license.
33
44namespace System . Runtime . CompilerServices
@@ -13,17 +13,22 @@ public static partial class RuntimeFeature
1313 /// </summary>
1414 public const string DefaultImplementationsOfInterfaces = nameof ( DefaultImplementationsOfInterfaces ) ;
1515
16+ /// <summary>
17+ /// Represents a runtime feature where byref-like types can be used in Generic parameters.
18+ /// </summary>
19+ public const string ByRefLikeGenerics = nameof ( ByRefLikeGenerics ) ;
20+
1621 /// <summary>
1722 /// Checks whether a certain feature is supported by the Runtime.
1823 /// </summary>
1924 public static bool IsSupported ( string feature )
2025 {
21- if ( feature == DefaultImplementationsOfInterfaces )
26+ return feature switch
2227 {
23- return true ;
24- }
25-
26- return false ;
28+ ByRefLikeGenerics or
29+ DefaultImplementationsOfInterfaces => true ,
30+ _ => false ,
31+ } ;
2732 }
2833 }
2934}
You can’t perform that action at this time.
0 commit comments