public static void CheckItem(CommandLineItem item) { if (item != null) { if (item.ExpectedArguments != item.Arguments.Count) { throw new CommandLineParseException(string.Format("'{0}' expects {1} argument(s)", item, item.ExpectedArguments)); } } }
private static void CheckItem(CommandLineItem item) { if (item == null) { return; } if (item.ExpectedArguments != item.Arguments.Count) { throw new CommandLineParseException($"'{item}' expects {item.ExpectedArguments} argument(s)"); } }