You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespace Test {
public class A {
public A(int a, string b = null) {
}
}
public class Program
{
private static void Main(string[] args)
{
Activator.CreateInstance(typeof(A), 100);
}
}
}
i run this code in .NET6, it also got a exception, so in lua it will also got a error
Unhandled exception. System.MissingMethodException: Constructor on type 'Test.A' not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Test.Program.Main(String[] args) in C:\Person\Project\code\cstolua\cstolua\src\Progrom.cs:line 20
Activity
yanghuan commentedon Aug 1, 2022
i run this code in .NET6, it also got a exception, so in lua it will also got a error