right now it is only reading the first line of the file and puting it into i. how can i read the next line of the file?

StreamReader sr = new StreamReader("c:\\iplist.txt");

            String[] list = new String[45];
            string S;
            sr = File.OpenText("c:\\iplist.txt");
            S = sr.ReadLine();
            while (S != null)
                for (int i = 0; i < S.Length; i++)
                    list[i] = S;

Because your code only tells it to read data one and then make a list and duplicate it or as many times as it is long. so if you had the word test you would have 4 copies of test