Savol №153 int c = 0; private void textBox1_TextChanged(object sender, EventArgs e) { c++; label1.Text = textBox1.Text+c.ToString(); } textBox1 da 1234 kiritilsa, label1 da qanday qiymat hosil bo'ladi? Javoblardan birini tanlang:
1) 4 2) 1234 3) 1234 4) 12344 Savol №154 textBox1 da 3 textBox2 da 2 kiritilganida quyidagi dasturiy kod bajarilishi natijasida labelda qanaqa qiymat hosil bo'lishini aniqlang double a, b, c; a = Convert.ToDouble(textBox1.Text); b = Convert.ToDouble(textBox2.Text); c = (a + b) / (b * b + Math.Abs((b * b + 2) / (a + a * a * a / 5))); label1.Text = c.ToString(".#"); Javoblardan birini tanlang:
1) -1.4 2) 1.6 3) -1.6 4) 1.1 Savol №155 delegate void Operation(int x, int y); private void button17_Click(object sender, EventArgs e) { Operation sum = (x, y) => textBox1.Text=$"{x} + {y} = {x + y}"; sum.Invoke(3, 7); sum(1,2); } button17 bosilganida textbox1 da qanaqa qiymat hosil bo'ladi? Javoblardan birini tanlang:
1) 10 3 2) 3 + 7 = 101 + 2 = 3 3) 1 + 2 = 3 4) 3 + 7 = 10 Savol №156 private void button1_Click(object sender, EventArgs e) { label1.Text = Convert.ToInt32(textBox1.Text) + textBox2.Text; } Dastur bajarilganida textbox1 ga 3 va textbox2 ga 5 kiritilib button1 bosilsa, Labelda qanday qiymat hosil bo'ladi? Javoblardan birini tanlang:
1) 3+5 2) 8 3) 35 4) Xatolik yuz beradi, chunki ikki xil tipdagi qiymatni qo'shib bo'lmaydi