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

标签 c# visual-studio-2012 command-line

我正在尝试编写一个简单的命令提示符程序,它将使用命令提示符获取输入。 样本输入是:

"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/

相关文章:

windows - 如何使用Windows命令行搜索文件,然后创建带有位置的文本文档?

c# - 由 2 个 View 使用的 PartialView 访问来自每个 View 的 ViewModel 数据

c# - 在 C# 中创建此 XML

c# - 请求卡在 RequestAquireState 模块名称 : Session

visual-studio - 单击 "Attach to Process"时 Visual Studio 2013 崩溃

windows - FFMPEG管道从Windows上的命令行输入文件名

c# - 错误处理WPF-MVVM

asp.net - 让 Sql Server Data Tools 与 Visual Studio 2012 Express Release Candidate 一起使用

c++ - 如何设置两个 vector<unique_ptr<...>> 彼此相等?

bash - 你如何使用命令启动 Unix screen 命令?