first brogram: the seconde program: explain the follwing in yellow I private voi
ID: 3833944 • Letter: F
Question
first brogram:
the seconde program:
explain the follwing in yellow
I private void button1 Click(object sender, EventArgs e) combo Box1.Items.Add Days") combo Box1.Items.Add Months") combo Box1.Items.Add "Years") private void comboBox1 SelectedlndexChanged(objectsender, EventAugse) if (comboBox 1.Selectedltem Days") comboBox2. Items. Clear(); comboBox2 Items,Add Saterday") combo Sunday" Monday"); comboBox2. Items Tuesday"); else if (comboBox1.Selectedltem Months") combo Box2.Items.Clear(): combo Box2.Items Add Jan") combo Box2.Items Add Feb'') March") combo Box2.Items April" else if (comboBox1.Selectedltem "Years") combo Box2.Items.Clear(): comboBox2. Items 2014") combo Box2.Items 2015" combo Box2.Items 2016" combo Box2.Items 2017 private void comboBox2 SelectedlndexChanged(objectsender, EventArgs e) textBox1. Text scomboBox2.Text private void button2 Click(object sender, EventAugse) The selected item textBox1.Text 'Contents Message Box Buttons,YesNoCancel);Explanation / Answer
first program:
comboBox1.Items.Add("Days");in this statement we are adding a value in item1 like days,
in this statement we are adding a value in item1 like months,in this statement we are adding a value in item1 like years.if(combobox1.selecteditem=="days");//in this line we are changing the name of days if the selection of days like saturday,sunday,monday,tuesday in combox2 otherwise we are changing the name of months if the selection of months like jan,feb,march,april otherwise we are changing the name of the year if the selection of years.then we are comparing the textbox1 selected value to combobox2 display the selected items in textbox1 after clicking button1 and the value yes,no or cancel at last we are adding the value in combobox3.
program2:here we are creating a listbox varialble sum ,integer type variable s,e and p and we are converting the text in a textbox1 into integer in variable s and the second line same as above.after this line we are comparing the value if(s>e) then p=s,s=e and e=p.we are checking the true value through creating a radio button using for loop if conditons are true then increment the sum value then update into textbox3.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.