C# Conditional Code