Enum - when C#


In the previous version, the reflection will NOT strickly require the argument to match. Therefore, one can pass in a Int to a C# method which expect an Enum type. (Since Enum are derived from Int, this conversion works perfectly).

However, with the new version, for a method which is defined as below
 TestMethod(Enum1 x, Enum2 y, Enum3 z, string[] zz), 
One will get the the following error. (How can we solve the problem?)

Message: Could not find a suitable static method TestMethod on type xxx for method parameters for method parameters Int32, Int32, Int32, Int32, String[])
Stack trace:
at Rclr.ReflectionHelper.ThrowMissingMethod(Type classType, String methodName, String modifier, Type[] types) in c:\Users\per202\AppData\Local\Temp\RtmpCgiQDm\R.INSTALL25f0662d7f4e\rClr\src\ClrFacade\ReflectionHelper.cs:line 785
at Rclr.ClrFacade.InternalCallStaticMethod(Type classType, String methodName, Boolean tryUseConverter, Object[] arguments) in c:\Users\per202\AppData\Local\Temp\RtmpCgiQDm\R.INSTALL25f0662d7f4e\rClr\src\ClrFacade\ClrFacade.cs:line 89
at Rclr.ClrFacade.CallStaticMethod(String typename, String methodName, Obje