public override string execute(Blackfin bf, string[] args) { try { int slot = int.Parse(args[0]); IPAddress ip = IPAddress.Parse(args[1]); switch (slot) { case 1: bf.SetDNS1(ip); // Resets the IP board, always returns false for an IP connection throw new ConnectionResetException("Set DNS 1"); case 2: bf.SetDNS2(ip); // Resets the IP board, always returns false for an IP connection throw new ConnectionResetException("Set DNS 2"); case 3: bf.SetDNS3(ip); // Resets the IP board, always returns false for an IP connection throw new ConnectionResetException("Set DNS 3"); } } catch (OverflowException) {} catch (FormatException) {} throw new CommandArgumentException("Invalid DNS slot value"); }