diff --git a/docs/csharp/fundamentals/program-structure/main-command-line.md b/docs/csharp/fundamentals/program-structure/main-command-line.md index 06a7303fd8bef..ee051c5acc6a9 100644 --- a/docs/csharp/fundamentals/program-structure/main-command-line.md +++ b/docs/csharp/fundamentals/program-structure/main-command-line.md @@ -1,7 +1,7 @@ --- title: "Main() and command-line arguments" description: Learn about Main() and command-line arguments. The 'Main' method is the entry point of an executable program. -ms.date: 05/14/2021 +ms.date: 03/14/2024 f1_keywords: - "main_CSharpKeyword" - "Main" @@ -189,6 +189,9 @@ long num = Convert.ToInt64(s); For more information, see and . +> [!TIP] +> Parsing command-line arguments can be complex. Consider using the [System.CommandLine](/dotnet/standard/commandline/) library (currently in beta) to simplify the process. + The following example shows how to use command-line arguments in a console application. The application takes one argument at run time, converts the argument to an integer, and calculates the factorial of the number. If no arguments are supplied, the application issues a message that explains the correct usage of the program. To compile and run the application from a command prompt, follow these steps: