c# refactoring code samples