Making a Circle object

Enter the following within curly braces below this line:

Circle circ = new Circle();

So we're creating a new Circle object. Now, remember, because this is going into TextBox1_TextChanged, and every time you press Enter, this will run again. Keep this in mind. That's OK for us--it doesn't really matter very much. We're just illustrating some basic concepts here.

Now add comment 11 at the end of this line, as follows:

//11. Makes a new circle object

Then, what we'll do is as follows. We'll set something. So, to set the radius, type the name of the object, that is, . (dot), and then notice that a little wrench shows together with the word Radius. When you select this from the list, it says get and set in a tooltip (refer ...

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.