我正在尝试编写一个简单的命令提示符程序,它将使用命令提示符获取输入。 样本输入是:
"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""
但是,我无法在之后输入
"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"
是否指定了在通过命令提示符输入时不应超过的最大字符数?
注意:我用的是VS2012
最佳答案
鉴于 MSDN blog :
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)
您的字符串长度为 257 个字符,方式在限制之下。我会在别处挖掘...
关于c# - 我可以通过命令提示符提供给 C# 程序的最大输入长度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33630514/