Skip to main content

Load string List into textbox

If you need to put the content of a list of List<string> in a textbox here is a simple way to do it.
Also set the multiline property of textbox to true.

List<string> stringList = new List<string>();
stringList.Add("Test string 1");
stringList.Add("Test string 2");
stringList.Add("Test string 3");
TextBox1.Text = string.Join(Environment.NewLine, stringList);

Comments

Popular posts from this blog