-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Description
Very similar to #67457 but opening a new issue since that one is tracking mono changes. We should throw TargetInvocationException with the inner exception set to OverflowException instead of directly throwing OverflowException
using System;
using System.Reflection;
using System.Linq;
public class Program
{
static void Main(string[] args)
{
ConstructorInfo[] constructors = typeof(object[]).GetTypeInfo().DeclaredConstructors.ToArray();
try
{
constructors[0].Invoke(new object[] { -1 });
}
catch (Exception ex)
{
Console.WriteLine(ex.GetType().FullName);
}
}
}