It's the second thing I need when someone clicks a button in a text box to display a name for the chutes, for example
I have a list: Neuro, Food, Capitalism
When I clicked the button, the textbox appeared
Neuro Capitalism
or
capitalism food
or
Neuro Food
Update I've been doing some research and I've been able to do this.
private void button1_Click(object sender, EventArgs e)
{
var words = new[] { "apple", "mango", "papaya", "banana", "guava", "pineapple" };
var wordss = new[] { "apple", "mango", "papaya", "banana", "guava", "pineapple" };
var wordsInRandomOrder = words.OrderBy(i => Guid.NewGuid());
var wordsInRandomOrders = wordss.OrderBy(i => Guid.NewGuid());
foreach (var word in wordsInRandomOrder)
{
textBox1.Text = word;
}
foreach (var word in wordsInRandomOrders)
{
textBox1.Text = textBox1.Text + wordss;
}
}
The problem is that in this part
foreach (var word in wordsInRandomOrders)
{
textBox1.Text = textBox1.Text + wordss;
}
instead of one of the words in var wordss
He's looking for it
pineappleSystem.String [] System.String [] System.String [] System.String [] System.String [] System.String []
What I have to do.
Update 2 I've been to change the code and now it's like this
var words = new[] { "apple", "mango", "papaya", "banana", "guava", "pineapple" };
var wordsInRandomOrder = words.OrderBy(i => Guid.NewGuid());
foreach (var word in wordsInRandomOrder)
{
textBox1.Text = word;
}
foreach (var word in wordsInRandomOrder)
{
textBox1.Text = textBox1.Text + word;
}
}
Already appears and does not appear pineappleSystem.String [] System.String [] System.String [] System.String [] System.String [] System.String []
but now it appears
guavamangobananapineappleappleguavapaya
How do I change forever to do only once.