Value type variables

Now, let's also make another method as follows:

private static void ChangeValue(double x){    x = 30;}

You've seen most of this, except perhaps the x = 30; line; so add comment 7 at the end of this line as follows:

//7. Setting the value 30 to x will not change the argument where the method is called

For clarity, the following code block shows what your code should look like up to this point:

//1. using is a keyword, it's blue//2. System is a name space that stores already created code//3. using System brings in existing codeusing System;//4. class is a required container for creating our own code samplespublic partial class _Default : System.Web.UI.Page{    private static void ChangeArray(int[] arr)    {  //5. void means do not ...

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.