Client-side functions in C#