add items to listbox from text file csharp

Code Example - add items to listbox from text file csharp

                
                        ListBox lb = new ListBox();
            System.IO.StreamReader sr = new System.IO.StreamReader("userTypes.txt");

            while (!sr.EndOfStream)
            {
                lb.Items.Add(sr.ReadLine());
            }
            sr.Close();