C Sharp - C# - select the winner random name

preview_player
Показать описание
This video tutorial will help you create an application where users will be able to select a random winner by using C Sharp, select the winner random name by using C#

Random winner = new Random();
int i = listBox1.Items.Count;
int chosenItem = winner.Next(0, i);
listBox1.SelectedIndex = chosenItem;
MessageBox.Show("The winner is: " + listBox1.SelectedItem.ToString());
Рекомендации по теме
Комментарии
Автор

hey thanks for the video it's so helpful, so this random is only choose 1 winner I want to choose many winners so can u create a video like I want?, or send me codes here please answer me as soon as possible.!

creepy
Автор

How can I do on code to not reapeat the names

paodeontem