internal static void VerifyResponse(FtpResponse response, uint[] expectedReplyCodes) { foreach (uint expectedReplyCode in expectedReplyCodes) { if (expectedReplyCode == response.ReplyCode) { return; } } throw new Exception(String.Format( "FTP: Expected reply code was {0}, however the server replied: {1}", JoinRetryCodes(expectedReplyCodes), response.ToString().Trim())); }