This is the second in a series of computer science lessons about programming with C# for beginners. In this lesson you will learn how to use a textbox control on a form to collect input from the user of your application. You will also learn how to declare and initialise variables to store different types of data while your program is running, and how to output the contents of these variables. You will learn how to build an output string by concatenating literal strings and the contents of variables together. In doing so, you will begin to understand the concept of casting, that is, how to convert the contents of a variable from one data type to another. You will also see the difference between explicit and implicit casting.

Chapters:
00:00 Introduction
00:32 TextBox and Label controls
02:36 String concatenation
05:15 Declare variables
09:58 Explicit casting
11:05 Implicit casting
12:08 Output string with line breaks
14:18 Collect input data from a form
17:24 Exercise
18:14 Solution
19:50 A runtime exception error