diff --git a/VkNet/Utils/RestClient.cs b/VkNet/Utils/RestClient.cs index 35a2880fa..22ab64fcd 100644 --- a/VkNet/Utils/RestClient.cs +++ b/VkNet/Utils/RestClient.cs @@ -89,7 +89,7 @@ private async Task> CallAsync(Func Predicate() => x => x.GetParameters() - .Any(p => p.ParameterType == typeof(VkError)); + private static Func Predicate() => x => Array.Exists(x.GetParameters(), p => p.ParameterType == typeof(VkError)); private static bool HasErrorCode(MemberInfo x, int errorCode) => ((VkErrorAttribute) Attribute.GetCustomAttribute(x, typeof(VkErrorAttribute))).ErrorCode == errorCode;