>using System; > >namespace CreditSights >{ > /// <summary> > /// The purpose of this program is to read in a file and search for all > /// occurrences of the string passed in. > /// > /// e.g. SearchForText.exe autonomous resume.txt > /// e.g. SearchForText.exe smart resume.txt > /// </summary> > class SearchForText > { > static void Main(string[] args) > { > string toFind = args[1]; > string file = args[2]; > > string text = System.IO.File.OpenText(file).ReadToEnd(); > > Console.WriteLine("Found it at: " + text.IndexOf(toFind)); > } > } >}>