"getopt" is a library that allows a parsing of arguments passed to a program. This is a useful library used in many software. There are many versions of the getopt library available, two popular versions being the BSD getopt and the GNU getopt.
转自:http://www.codeproject.com/Articles/26502/GetOpt-for-NET C#中的getopt封装,方便处理cmd命令。添加引用后,使用范例如下: using CodePoints; using System; ... public static void Main ( string [] args ) { int c = 0, aflag = 0, bflag = 0; string cvalue = "(null)"; while ( ( c