public static void Test(string[] args) { // client if (args.Length == 2) { var c = new UdpClient(); c.Start(args[0], int.Parse(args[1])); } // server else if (args.Length == 1) { var c = new UdpServer(); c.Start(int.Parse(args[0])); } else { Console.WriteLine("incorrect parameters."); } }
public static void Test(string[] args) { // client if (args.Length == 2) { var c = new UdpClient(); c.Start(args[0], int.Parse(args[1])); } // server else if (args.Length == 1) { var c = new UdpServer(); c.Start(int.Parse(args[0])); } else { Console.WriteLine("incorrect parameters."); } }