Simplifying C#