[tip: commandline argument]Environment.GetCommandLineArgs

MSDN

Returns a string array containing the command-line arguments for the current process.

 

Input at the command line

Resulting command line arguments

MyApp alpha beta

MyApp, alpha, beta

MyApp "alpha with spaces" "beta with spaces"

MyApp, alpha with spaces, beta with spaces

MyApp 'alpha with spaces' beta

MyApp, 'alpha, with, spaces', beta

MyApp \\\alpha \\\\"beta

MyApp, \\\alpha, \\bet

MyApp \\\\\"alpha \"beta

MyApp, \\"alpha, "beta

 

posted @ 2010-10-27 11:41  能巴  阅读(179)  评论(0编辑  收藏  举报