I agree with Sergey Berezovskiy that the method syntax he showed is less beautifull than the query syntax. But the method syntax can be rewritten to this:
methods.Where(IsTheRightMethod);
and a regular method:
private bool IsTheRightMethod(MethodInfo methodInfo)
{
if (methodInfo.ReturnType != typeof(void)) return false;
var parameters = methodInfo.GetParameters();
return parameters.Length == 1 && parameters[0].ParameterType == typeof(wantedType);
}
The OP wanted a short solution. If this is short depends on how you look at it. The Linq query is shorter and anonymous types are not created.
This solution also makes debugging easier and is also easier to extend. An example of the latter might be:
methods.Where(m => IsTheRightMethod(m, typeof(wantedType), 1));
and
private bool IsTheRightMethod(MethodInfo methodInfo, Type parametertype, int parametersLenght)
{
if (methodInfo.ReturnType != typeof(void)) return false;
var parameters = methodInfo.GetParameters();
return parameters.Length == parametersLenght &&
parameters.All(p => p.ParameterType == parametertype);
}