private static void EnterRDCP(Xbox xbox) { //Get input string input = string.Empty; xbox.Connect(); //Loop do { Console.Write("{0}>", xbox.Name); input = Console.ReadLine(); string[] cmd = GetCommand(input); if (input == ".") { } else if (cmd.Length > 0 && cmd[0].ToUpper() != "BYE") { xbox.SendCommand(cmd[0], cmd.Where((c, i) => i > 0).ToArray()); Thread.Sleep(5); xbox.GetResponse(); } else { break; //If user types bye command exit the loop and disconnect } }while (true); //Disconnect xbox.Disconnect(); }