Yet another C# solution