Answers for "add items in listbox c#"

C#
3

add items to listbox from text file c#

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

            while (!sr.EndOfStream)
            {
                lb.Items.Add(sr.ReadLine());
            }
            sr.Close();
Posted by: Guest on November-26-2020
1

how to add item to listbox in c#

mylistbox.Items.Add("hello world");
Posted by: Guest on April-20-2022

C# Answers by Framework

Browse Popular Code Answers by Language