Подія
17 бер., 21 - 21 бер., 10
Приєднайтеся до серії нарад, щоб створити масштабовані рішення зі ШІ на основі реальних випадків використання з колегами-розробниками та експертами.
Зареєструватися заразЦей браузер більше не підтримується.
Замініть його на Microsoft Edge, щоб користуватися перевагами найновіших функцій, оновлень безпеки та технічної підтримки.
Arguments provided to an executable on the command line are accessible in top-level statements or through an optional parameter to Main
. The arguments are provided in the form of an array of strings. Each element of the array contains one argument. White-space between arguments is removed. For example, consider these command-line invocations of a fictitious executable:
Input on command line | Array of strings passed to Main |
---|---|
executable.exe a b c | "a" "b" "c" |
executable.exe one two | "one" "two" |
executable.exe "one two" three | "one two" "three" |
Примітка
When you are running an application in Visual Studio, you can specify command-line arguments in the Debug Page, Project Designer.
This example displays the command-line arguments passed to a command-line application. The output shown is for the first entry in the table above.
// The Length property provides the number of array elements.
Console.WriteLine($"parameter count = {args.Length}");
for (int i = 0; i < args.Length; i++)
{
Console.WriteLine($"Arg[{i}] = [{args[i]}]");
}
/* Output (assumes 3 cmd line args):
parameter count = 3
Arg[0] = [a]
Arg[1] = [b]
Arg[2] = [c]
*/
Відгук про .NET
.NET – це проект із відкритим кодом. Виберіть посилання, щоб надати відгук:
Подія
17 бер., 21 - 21 бер., 10
Приєднайтеся до серії нарад, щоб створити масштабовані рішення зі ШІ на основі реальних випадків використання з колегами-розробниками та експертами.
Зареєструватися заразНавчання
Модуль
Challenge project - Work with variable data in C# - Training
A challenge project to test C# skills working with variable data.
Документація
C# docs - get started, tutorials, reference.
Learn C# programming - for beginning developers, developers new to C#, and experienced C# / .NET developers
Object-Oriented Programming - C#
C# provides full support for object-oriented programming including abstraction, encapsulation, inheritance, and polymorphism.
General Structure of a Program - C#
Learn about the structure of a C# program by using a skeleton program that contains all the required elements for a program.