O'Reilly logo

Beginning C# 7 Hands-On – The Core Language by Tom Owsiak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required