2) 23
3) 32
4) 2023
Savol №134
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{ richTextBox1.Text = d.DriveType.ToString(); }
Dastur kodi bajarilishi natijasida richTextBox1 komponentasida qanday qiymat hosil bo'ladi?
Javoblardan birini tanlang:
1) Xatolik
yuz beradi, chunki DriveType qiymati matnli emas
2) Kompyuterdagi barcha mantiqiy driver (Disk) larning tartibi bo'yicha eng oxirgisining turi (tipi)
haqidagi ma'lumot
3) Kompyuterdagi D diskning turi (tipi) haqidagi ma'lumot
4) Kompyuterdagi tartibi bo'yicha ketma-ket barcha mantiqiy driver (Disk) larning turi (tipi)
haqidagi ma'lumot
Savol №135
int c = 0;
private void textBox1_TextChanged(object sender, EventArgs e)
{
label1.Text = (++c).ToString();
}
textBox1 da 1234
kiritilsa, label1 da qanday qiymat hosil bo'ladi?
Javoblardan birini tanlang:
1) 3
2) 1234
3) 123
4) 4
Savol №136
Counter sinfi quyidagicha aniqlangan:
class
Counter
{
public int Number { get; set; }
public static int operator +(Counter counter, int val)
{ return counter.Number + val; }
}
Quyidagi murojaat natijasini aniqlang:
Counter counter = new Counter();
int x = counter+6;
Console.WriteLine(x++);
Javoblardan birini tanlang:
1) Xatolik yuz beradi, int x=6+counter; kabi murojaat
qilinishi lozim edi
2) 6
3) Xatolik yuz beradi, counterga qiymat uzatilmagan