Trying to get a method to work - C#