How do I implement this? - C#