Skip to content

Commit d195a24

Browse files
authored
Added missing 'string[] args' to Main method in code samples (#1004)
`args` parameter was missing in code samples
1 parent 241a197 commit d195a24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/How-To.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var parent = new RootCommand("parent")
6565
The simplest case for invoking your code, if you have a program so simple that it has no inputs beyond invocation itself, would look like this:
6666

6767
```csharp
68-
static void Main()
68+
static void Main(string[] args)
6969
{
7070
var rootCommand = new RootCommand();
7171

@@ -96,7 +96,7 @@ The process of creating these values based on command line input is known as mod
9696
The most common way that `System.CommandLine` performs model binding is to match option or argument names or aliases to the parameter names on a handler, or to the property names of complex objects passed to a handler. Parameters or properties are matched using a convention that matches camel-cased parameter names to kebab-cased option names. In this example, the option `--an-int` matches parameter `anInt` on the `DoSomething` method.
9797

9898
```csharp
99-
static void Main()
99+
static void Main(string[] args)
100100
{
101101
var rootCommand = new RootCommand();
102102

0 commit comments

Comments
 (0)