What does the following code do? Assume this method is invoked by using Mystery ( 70, 80 ).
What will be an ideal response?
The complete corrected application should read:
// Double.cs (Correct)
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Double
{
///
/// Summary description for FrmDouble.
///
public class FrmDouble : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnDouble;
private System.Windows.Forms.TextBox txtInput;
private System.Windows.Forms.Label lblDoubled;
private System.Windows.Forms.Label lblDoubledText;
private System.Windows.Forms.Label lblInputText;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public FrmDouble()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent
// call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
// Windows Form Designer generated code
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run( new FrmDouble() );
}
// prints the result of helper method TimesTwo
private void btnDouble_Click(
object sender, System.EventArgs e)
{
int intInputNumber;
intInputNumber = Int32.Parse( txtInput.Text ) ;
lblDoubled.Text =
Convert.ToString( TimesTwo( intInputNumber ) );
} // end method btnDouble_Click
// returns the input multiplied by 2
int TimesTwo( int intNumber )
{
int intResult;
intResult = intNumber * 2;
} // end method TimesTwo
} // end class FrmDouble
}

Computer Science & Information Technology
You might also like to view...
Windows 10 allows you to search for specific kinds of files.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
A variety of TCP/IP protocols work below the Application layer of the OSI model to provide support to the many applications we use on a TCP/IP network.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
The command that reduces the file size of a video is:
A. Edit B. Trim C. Compress
Computer Science & Information Technology
Tablet computers are typically about the size of a notebook computer and are designed to be used with a digital pen/stylus or touch input.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology