❔ How i can write this code more efficient - C#