Inserting two text boxes and a button

Let's first create a program that takes two TextBox controllers. Then, we will read the values and operate on them mathematically.

Go to View, switch over to Toolbox, and then add two text boxes. Type tex and drag TextBox into the form, and then, insert a <br>tag and put another TextBox control under it. After that, grab a Button control from the Toolbox control and drag it under the second TextBox control in the form. Your screen should appear as shown in the following screenshot:

Figure 3.8.1: Your form after dragging in two text boxes and a button

Get Beginning C# 7 Hands-On – The Core Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.