void CmdWindowPosition(string[] arguments) { if (arguments.Length == 1) { string[] cords = arguments[0].Split(','); if (cords.Length == 2) { int x, y; var xParsed = int.TryParse(cords[0], out x); var yParsed = int.TryParse(cords[1], out y); if (xParsed && yParsed) { WindowsUtil.SetWindowPosition(x, y); return; } } } Console.Write("Usage: windowpos <x,y>"); }