내가 완전히 새로운 해요 및 C#에서 자신을 연구, 내가 RexTester에이 코드를 시도명령 줄 인수가 제대로 반환되지
Number of command line parameters = 3
Arg[0] = [A]
Arg[1] = [B]
Arg[2] = [C]
출력
// cmdline1.cs
// arguments: A B C
using System;
public class CommandLine
{
public static void Main(string[] args)
{
// The Length property is used to obtain the length of the array.
// Notice that Length is a read-only property:
Console.WriteLine("Number of command line parameters = {0}",
args.Length);
for(int i = 0; i < args.Length; i++)
{
Console.WriteLine("Arg[{0}] = [{1}]", i, args[i]);
}
}
}
인터넷에서이 예제를 찾았지만 출력은 다음과 같습니다.
Number of command line parameters = 1
Arg[0] = [parameter for the curious]
출력 T는 A B와 C를 가질 것인가?
지정한 명령 줄은 무엇입니까? –
명령 줄 인수가 일반적으로 어떻게 작동하는지 또는 Rextester에서 출력을 얻는 방법을 묻고 있습니까? –
"입력"링크를 클릭해도 Rextester가 명령 줄 인수를 처리하지 않는 것처럼 보입니다. –