From 0cdc68d7f0a182a96d9d11a432d540dac0a47baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0?= Date: Tue, 2 Oct 2018 15:20:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B8=D0=B7=20=D0=BF=D1=80=D0=B5=D0=B4=D1=8B=D0=B4=D1=83?= =?UTF-8?q?=D1=89=D0=B5=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fileFinder/MainForm.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fileFinder/MainForm.cs b/fileFinder/MainForm.cs index fa04b18..435ec7e 100644 --- a/fileFinder/MainForm.cs +++ b/fileFinder/MainForm.cs @@ -123,13 +123,9 @@ namespace fileFinder private bool isFileContainQuery (string[] fileLines, string query) { - int count = 0; - while (fileLines.Length > count) - if (fileLines[count].IndexOf(query) != -1) - { + foreach (string item in fileLines) + if (item.IndexOf(query) != -1) return true; - } - count++; return false; }