❔ How do I make these two codes less copy pasta? - C#