Kodey Crandall, M.S.
INFO 1200-002
8 October 2015
Midterm Extra Credit: 5 Questions to Study
1. Determine why this code wouldn’t work. class WhereTheWitchAt
{
static void Main() { int value = 6; log (value) { case 4: Console.WriteThis(4); break; case 6: Console.WriteThis(6); break; } }
}
a. Static void isn’t valid
b. Log should be replaced with switch
c. Int value cannot be the same as case number
d. Class should always be Form1
2. Which code is not properly formatted?
a. 435 = theDigits
b. myName = txtName.Text
c. helloThere = “Hi!” firstName.Text
d. theLifeLength = 90
3. Which code method won’t clear a text box?
a. txtInput.Text = String.Empty
b. txtInput.Text =””
c. (textInput).Text.Clear()