Challenge complete

Challenge complete in C# but fairly inelegant