August 2017
Beginner
566 pages
12h 34m
English
Let's go over to the Design view and then double-click on the Button control. This, of course, brings up the event handler. First, we'll create a method above it called GetValueAndInterest. For this, enter the following:
private static void GetValueAndInterest(out decimal interest, ref decimal value)
You've seen private, static, and void before. Here, GetValueAndInterest is the name of our method. This is followed by out decimal, then interest, and then ref decimal value. Follow this with open and close curly braces.
Before we go further, let's add a couple of comments to understand how this is helpful. So, start by entering comment 5 as follows:
//5. interest is the result of a calculation done inside ...
Read now
Unlock full access