Improve C# connect