how do I make wpf label print out arrays of strings by using only one label text. I try to loop the answer by putting foreach. however it only print the last string of the array.
this is the example:
input : h t t p
string word = input_box.Text;
string[] split = word.Split(new char[] { ',', ' ' });
foreach (string s in split)
{
if (s.Trim() != " ")
label1.Content = s;
}
output:
p
can anyone please help me?