Examlex

Solved

Identify the Error in the Following Code

question 26

Multiple Choice

Identify the error in the following code:
Private Sub btnCalculate_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnCalculate.Click
' Declare some variables
Dim sngNumber1 As Single
Dim sngNumber2 As Single
Dim sngSum As Single

' Get the two numbers
SngNumber1 = txtNumber1.Text
SngNumber2 = txtNumber2.Text
' Calculate their sngSum... is the next line working?
SngSum = sngNumber1 + sngNumber2
' Display the result
LblSum.Text = sngSum.ToString
End Sub


Definitions:

Base Pairs

Pairs of nucleotides that form the building blocks of the DNA double helix, with adenine pairing with thymine, and cytosine pairing with guanine.

Insertion

The attachment site of a muscle tendon to the bone that moves when the muscle contracts.

Reverse Transcriptase

An enzyme that catalyzes the formation of DNA from an RNA template, used by retroviruses in their replication process.

Retroviruses

A group of RNA viruses that insert a DNA copy of their genome into the host cell to replicate, associated with certain cancers and HIV.

Related Questions