C# Solution for Client and Server