Skip to content

Commit

Permalink
Fix mistakes in AdditionalFeatures.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yakovypg committed May 27, 2024
1 parent 3c6b82d commit 4256330
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Docs/AdditionalFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ parser.ParseKnownArguments(
```

## Parse Known Arguments
Sometimes a program may need to parse only part of the command-line arguments and pass the remaining arguments to another program. In this case, the `ParseKnownArguments` function may be useful. It works in much the same way as the `Parse` function, except that it doesn't throw an exception if there are additional arguments. Instead, it allows you to get a list of the extra argument.
Sometimes a program may need to parse only part of the command-line arguments and pass the remaining arguments to another program. In this case, the `ParseKnownArguments` function may be useful. It works in much the same way as the `Parse` function, except that it doesn't throw an exception if there are additional arguments. Instead, it allows you to get a list of the extra arguments.

```cs
bool verbose = false;
Expand All @@ -83,10 +83,8 @@ var parser = new ArgumentParser()
NumberOfArgumentsToSkip = 1
};

/*
...
parser.AddOptions(...);
*/
// ...
// parser.AddOptions(...);
parser.Parse(new string[] { "merge", "./first.txt", "./second.txt" });
// Only ["./first.txt", "./second.txt"] will be parsed
Expand Down

0 comments on commit 4256330

Please sign in to comment.