简体   繁体   English

我可以通过命令提示符向C#程序提供的最大输入长度是多少?

[英]what is the Max length of input I can provide to a C# program via command prompt?

I am trying to write a simple command prompt program which will take input from used using command prompt. 我正在尝试编写一个简单的命令提示程序,它将从使用命令提示符中获取输入。 The sample input is: 样本输入是:

"InsertLicenseHeader /hf "f:\Repository\WNJavaSourceFileHeader_V1.2.txt" /regexp "^((\r)?\n)?\/\*.+(\(C\)opyright|Copyright \(c\)) ([0-9]{4}-)?[0-9]{4} (by )?Wincor Nixdorf.+This software is the confidential and proprietary information.+terms of the license agreement.+$" /dir "c:\folder with my java project" /ext java /backup 1 /log ".\protocol.log""

However, I am not able to type after 但是,我无法输入

"InsertLicenseHeader /hf "f:\Repository\WNJavaSourceFileHeader_V1.2.txt" /regexp "^((\r)?\n)?\/\*.+(\(C\)opyright|Copyright \(c\)) ([0-9]{4}-)?[0-9]{4} (by )?Wincor Nixdorf.+This software is the confidential and proprietary information.+terms of the licens"

Is there any maximum number of characters specified which should not exceed while giving input via command prompt? 是否指定了通过命令提示符输入时不应超过的最大字符数?

Note: I am using VS2012 注意:我使用的是VS2012

Given the MSDN blog : 鉴于MSDN博客

In Command Prompt, the total length of the following command line that you use at the command prompt cannot contain more than either 2047 or 8191 characters (as appropriate to your operating system) 在命令提示符中,在命令提示符下使用的以下命令行的总长度不能超过2047或8191个字符(根据您的操作系统而定)

Your string is 257 char long, which is way under the limitation. 您的字符串是257字符长,这是限制正在进行中。 I would dig elsewhere... 我会去其他地方挖...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM