Trying to figure out an exercise - C#