Skip to content

Commit 91d3051

Browse files
author
Immo Landwerth
authored
Adds back Enum constraint to Enum.GetNames<TEnum>() (#100844)
1 parent 807562e commit 91d3051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Runtime/ref/System.Runtime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ protected Enum() { }
24362436
public override int GetHashCode() { throw null; }
24372437
public static string? GetName(System.Type enumType, object value) { throw null; }
24382438
public static string[] GetNames(System.Type enumType) { throw null; }
2439-
public static string[] GetNames<TEnum>() where TEnum : struct { throw null; }
2439+
public static string[] GetNames<TEnum>() where TEnum : struct, System.Enum { throw null; }
24402440
public static string? GetName<TEnum>(TEnum value) where TEnum : struct, System.Enum { throw null; }
24412441
public System.TypeCode GetTypeCode() { throw null; }
24422442
public static System.Type GetUnderlyingType(System.Type enumType) { throw null; }

0 commit comments

Comments
 (0)