문제

What is the most efficient way to ask a MethodInfo if it accepts parameters and, if so, how many?

My current solutions would be: methodInfo.GetParameters().Any() and methodInfo.GetParameters().Count().

Is this the most efficient way?

Since I don't actually need any of the ParameterInfo objects, is there a way to do this without a call to GetParameters()?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top