Skip to content

Commit

Permalink
Expose the RuntimeFeature.NumericIntPtr member for C# 11 (#69322)
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed May 13, 2022
1 parent 0615148 commit 20cd393
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -37,6 +37,11 @@ public static partial class RuntimeFeature
/// </summary>
public const string VirtualStaticsInInterfaces = nameof(VirtualStaticsInInterfaces);

/// <summary>
/// Indicates that this version of runtime supports <see cref="System.IntPtr" /> and <see cref="System.UIntPtr" /> as numeric types.
/// </summary>
public const string NumericIntPtr = nameof(NumericIntPtr);

/// <summary>
/// Checks whether a certain feature is supported by the Runtime.
/// </summary>
Expand All @@ -50,6 +55,7 @@ public static bool IsSupported(string feature)
case UnmanagedSignatureCallingConvention:
case DefaultImplementationsOfInterfaces:
case VirtualStaticsInInterfaces:
case NumericIntPtr:
return true;
case nameof(IsDynamicCodeSupported):
return IsDynamicCodeSupported;
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Expand Up @@ -11817,6 +11817,7 @@ public static partial class RuntimeFeature
public const string ByRefFields = "ByRefFields";
public const string CovariantReturnsOfClasses = "CovariantReturnsOfClasses";
public const string DefaultImplementationsOfInterfaces = "DefaultImplementationsOfInterfaces";
public const string NumericIntPtr = "NumericIntPtr";
public const string PortablePdb = "PortablePdb";
public const string UnmanagedSignatureCallingConvention = "UnmanagedSignatureCallingConvention";
public const string VirtualStaticsInInterfaces = "VirtualStaticsInInterfaces";
Expand Down

0 comments on commit 20cd393

Please sign in to comment.