Searching for data in a console App!
<pre><code>using System;
using System.IO;
using System.Collections;
namespace ReadFiles
{
    class Program
    {
        static void Main(string[] args)

        {
            StreamReader objstream = new StreamReader("c:\\documents and settings\\btallos\\desktop\\Company.txt");
            string sLine ="";
            ArrayList arrText = new ArrayList();

                while (sLine != null)
                {
                    sLine = objstream.ReadLine();
                    if (sLine != null)
                        arrText.Add(sLine);
                }

            objstream.Close();
            foreach (string sOutput in arrText)
            Console.WriteLine(sOutput);
            Console.ReadLine();
        }
    }
}
</code></pre>

<p>I wrote a console app that displays information from a local file on my desktop and displays the content within the file. I was wondering how can I create a function that can search for keywords and only display the words, I want it to search for?</p>

<p>Can anyone help me out?</p>
