Make Delegate.GetMethodInfo extension return non-nullable (dotnet/corefx#41367)
authorStephen Toub <stoub@microsoft.com>
Thu, 26 Sep 2019 21:31:10 +0000 (14:31 -0700)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2019 21:31:10 +0000 (14:31 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/e0338a64488dde44c94c843bb15df8dc21138aa9

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

index 4709094..7dfc7fa 100644 (file)
@@ -6328,7 +6328,7 @@ namespace System.Reflection
     }
     public static partial class RuntimeReflectionExtensions
     {
-        public static System.Reflection.MethodInfo? GetMethodInfo(this System.Delegate del) { throw null; }
+        public static System.Reflection.MethodInfo GetMethodInfo(this System.Delegate del) { throw null; }
         public static System.Reflection.MethodInfo? GetRuntimeBaseDefinition(this System.Reflection.MethodInfo method) { throw null; }
         public static System.Reflection.EventInfo? GetRuntimeEvent(this System.Type type, string name) { throw null; }
         public static System.Collections.Generic.IEnumerable<System.Reflection.EventInfo> GetRuntimeEvents(this System.Type type) { throw null; }
index 69235a1..5ded4b8 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Reflection
             return typeInfo.GetInterfaceMap(interfaceType);
         }
 
-        public static MethodInfo? GetMethodInfo(this Delegate del)
+        public static MethodInfo GetMethodInfo(this Delegate del)
         {
             if (del == null)
             {