GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Which of the following is not true about the null-conditiona…

Which of the following is not true about the null-conditional operator?

Read Details

Which of the following is a way to open the Code Editor wind…

Which of the following is a way to open the Code Editor window for a form?

Read Details

If you code a break statement in a loop, it will cause the a…

If you code a break statement in a loop, it will cause the application

Read Details

Variables named according to Pascal notation

Variables named according to Pascal notation

Read Details

Code example 7-1private void btnCalculate_Click(object sende…

Code example 7-1private void btnCalculate_Click(object sender, System.EventArgs e){    decimal weightInPounds = 0m;    try    {        weightInPounds = Convert.ToDecimal(txtPounds.Text);        if (weightInPounds > 0)        {            decimal weightInKilos = weightInPounds / 2.2m;            lblKilos.Text = weightInKilos.ToString(“f2”);        }        else        {            MessageBox.Show(“Weight must be greater than 0.”, “Entry error”);           txtPounds.Focus();        }    }    catch(FormatException)    {        MessageBox.Show(“Weight must be numeric.”, “Entry error”);        txtPounds.Focus();    }} (Refer to code example 7-1.) If the user enters -1 in the text box and clicks the Calculate button, what does the code do?

Read Details

Given the following Random object named number, which of the…

Given the following Random object named number, which of the following statements returns a double value that is greater than or equal to 0.0 and less than 1.0?Random number = new Random();

Read Details

What happens when this statement is executed? Automobile ca…

What happens when this statement is executed? Automobile car = new Automobile(1);

Read Details

Code Example 4-1decimal a = 2.5m;decimal b = 4.0m;decimal c…

Code Example 4-1decimal a = 2.5m;decimal b = 4.0m;decimal c = 12.7m;int i = 4;int j = 8;int k = 17; (Refer to Code Example 4-1.) What is the value of x after the following statement is executed?decimal x = a + b;

Read Details

Code example 7-1private void btnCalculate_Click(object sende…

Code example 7-1private void btnCalculate_Click(object sender, System.EventArgs e){    decimal weightInPounds = 0m;    try    {        weightInPounds = Convert.ToDecimal(txtPounds.Text);        if (weightInPounds > 0)        {            decimal weightInKilos = weightInPounds / 2.2m;            lblKilos.Text = weightInKilos.ToString(“f2”);        }        else        {            MessageBox.Show(“Weight must be greater than 0.”, “Entry error”);           txtPounds.Focus();        }    }    catch(FormatException)    {        MessageBox.Show(“Weight must be numeric.”, “Entry error”);        txtPounds.Focus();    }} (Refer to code example 7-1.) If the user enters “200#” in the text box and clicks the Calculate button, what does the code do?

Read Details

What will the cboNumbers combo box contain if the following…

What will the cboNumbers combo box contain if the following method is called twice?private void Fill(){    for (int i = 1; i < 5; i++)    {        cboNumbers.Items.Clear();        cboNumbers.Items.Add(i);    }}

Read Details

Posts pagination

Newer posts 1 … 30 31 32 33 34 … 69,994 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top