C# Programming using Windows Form 1. Define a variable named isTrue that stores a value of whether...

90.2K

Verified Solution

Question

Programming

C# Programming using Windows Form


1. Define a variable named isTrue that stores a value of
whether something is true or false. Set this variable
   to the negative. Output this variable to thetxtIsTrue textbox.

2. Define a variable named favoriteGame that could store
the name of a game. Set this variable's value to your favoritegame. Output this variable to the txtFavoriteGame textbox.

3.. Define a variable named pi that can store real numbers.initialize it to a value of 3.14. Output the value to txtPi

4. Create a control structure that will print out \"That'sRight\"
to a textbox named txtRightOrWrong if isTrue from the 1st problemis positive result and \"Nope\" if isTrue is not true.

5. Write a loop of your choosing to print out thefollowing
numbers to txtLoop textbox: -1 -3 -5 -7 -9 -13 -15 -17
  

6. Write a nested loop to print out the following totxtNestedLoop:
0
0 1
0 2 4
0 3 6 9
0 4 8 16 32
  

7. Call the method from number 8 and output the result toxtMethodCall textbox.

8. Create a method called Foo that takes an integer from
txtForFoo and returns Bar the amount of times entered.
ex: txtForFoo is 2 the result is \"Bar Bar\".

9. Add a try catch block in the Foo method to catchthe  generic exception and one other exception of yourchoosing
bonus 5 pts if it applies to the method.

10. Create an array of 2 DateTime objects. Set the first
to the current date and time. Set the second to the
current date. Output both dates with a space between
them to txtDates.

/* ***BONUS***
Time how long it takes from the loading of the program
until the run button finishes running the first time it
is clicked.

Answer & Explanation Solved by verified expert
4.0 Ratings (442 Votes)
Question1Answer bool isTrue falsetxtIsTrueText isTrueToStringdisplay isTrue in thetextboxExplanation Below screen shows the value inthe textboxQuestion2Answer string favoriteGame    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students