Can i simplify the code??? - C#