使用方法签名,例如:
public interface TestInterface
{
void SampleMethodOut(out int? nullableInt);
void SampleMethod(int? nullableInt);
}
我typeof(TestInterface).GetMethods()[1].GetParameters()[0].ParameterType用来获取类型,然后检查IsGenericTypeand Nullable.GetUnderlyingType。如何使用带有 out 参数的方法执行此操作?