static void GetResult(ISearcher searcher, string substring, string text) { var t = new Stopwatch(); t.Start(); var entries = searcher.GetAllEntries(substring, text); t.Stop(); Console.WriteLine($"\nAlgorithm: {searcher.GetType().Name}\nEntries: {entries.Count()}\nTime: {t.ElapsedMilliseconds} ms\n"); t.Reset(); }