c# - How do I modify the Environment.CommandLine property? -
for unit tests mimic different commandline arguments. how modify commandline args program @ runtime (looked around can't find trick)? trying find way modify contents of readonly property environment.commandline.
you can't, 'hard' read-only. comes out of windows, getcommandline api function, doesn't allow modifying either. you'll have mock it.
Comments
Post a Comment