Finding Data Application with Events and Parallel Arrays - C Sharp Tutorial

preview_player
Показать описание
#ParallalArrays #.netEvents #EventHandling #CSharpTutorial
Like, Share, And Subscribe | Professor Saad Yousuf
Finding Data Application with Events and Parallel Arrays - C Sharp Tutorial
string[] ids = { "111", "112", "113", "114" };
for (int i=0;i<=3;i++)
{
listId.Items.Add(ids[i]);
}

string[] names = { "Samantha", "Jim", "Tom", "Joan" };
double[] scores = { 74, 80, 99, 100 };

int idx = listId.SelectedIndex;
double score = scores[idx];
if (score >= 90 && score <= 100)
textLetter.Text = "A";
else if (score >= 80)
textLetter.Text = "B";
else if (score >= 70)
textLetter.Text = "C";
else if (score >= 60)
textLetter.Text = "D";
else
textLetter.Text = "F";
textName.Text = names[idx];
textScore.Text = scores[idx].ToString();
Рекомендации по теме
visit shbcf.ru