subject

Private 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();
}
}
If the user enters 118 in the text box and clicks the Calculate button, what does the code do?

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:30, arri05
What is force? what are the types of force ? explain all with suitable examples
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, babbybronx
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, riah133
Creating "smart interfaces" in all sectors of industry, government, and the public arena is one of the fastest growing hct areas. these interfaces model, interpret, and analyze such human characteristics as speech, gesture, and vision. the field of biometrics, in which humans authenticate themselves to machines, is an area of considerable interest to hct practitioners. fingerprint scans are one of the most frequently used biometric options, and this article, biometric student identification: practical solutions for accountability & security in schools, makes a case for the implementation of fingerprint scans in schools. critique the article, and answer the following questions: according to the author, what are the main benefits of adopting fingerprint scans in schools for student identification? according to the author, what are the main drawbacks of adopting fingerprint scans in schools for student identification? do you agree with the author's assessment of the pl
Answers: 2
image
Computers and Technology, 23.06.2019 00:30, alex7078
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
You know the right answer?
Private void btnCalculate_Click(object sender, System. EventArgs e) {
decimal weightInPounds...

Questions in other subjects:

Konu
Mathematics, 16.11.2020 05:40
Konu
History, 16.11.2020 05:40
Konu
Mathematics, 16.11.2020 05:40