C# Solution

Cory's solution