Skip to content

Commit 47d717e

Browse files
authored
Update README.md
fix outdated README section under csharp with working example.
1 parent a0e9cb7 commit 47d717e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

‎README.md‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,8 @@ class Options{
9191
Consume them:
9292
```csharp
9393
staticintMain(string[] args){
94-
varresult=CommandLine.Parser.Default.ParseArguments<Options>(args);
95-
varexitCode=result
96-
.MapResult(
97-
options=>{
98-
if (options.Verbose) Console.WriteLine("Filenames:{0}", string.Join(",", options.InputFiles.ToArray()));
99-
return0},
100-
errors=>{
101-
LogHelper.Log(errors);
102-
return1});
103-
returnexitCode;
104-
}
94+
varoptions=newOptions();
95+
varisValid=CommandLine.Parser.Default.ParseArgumentsStrict(args, options);
10596
```
10697
**F#:**
10798
```fsharp

0 commit comments

Comments
(0)