I need help creating a function c# - C#