c# solution