November 2017
Intermediate to advanced
800 pages
30h 51m
English
To enumerate or iterate (that is, loop through) the values of those four arguments, add the following lines of highlighted code after outputting the length of the array:
WriteLine($"There are {args.Length} arguments.");
foreach (string arg in args)
{
WriteLine(arg);
}
We will now use these arguments to allow the user to pick a color for the background, foreground, width, and height of the console window.
Change the argument values to the following:
red yellow 50 10
Import the System namespace by adding the following line to the top of the code file if it is not already there:
using System;
Read now
Unlock full access