✅ How to improve my code? - C#