When building console applications that take parameters, you can use the arguments passed to Main(string[] args)
.
(构建带有参数的控制台应用程序时,可以使用传递给Main(string[] args)
。)
In the past I've simply indexed/looped that array and done a few regular expressions to extract the values.
(过去,我只是索引/循环该数组,并做了一些正则表达式来提取值。)
However, when the commands get more complicated, the parsing can get pretty ugly. (但是,当命令变得更复杂时,解析可能会变得很丑陋。)
So I'm interested in:
(所以我对以下内容感兴趣:)
- Libraries that you use
(您使用的库)
- Patterns that you use
(您使用的模式)
Assume the commands always adhere to common standards such as answered here .
(假定命令始终遵循通用标准,例如此处回答 。)
ask by Paul Stovell translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…