What you are seeing is a special conditional operator, the ternary operator. (And here is a nice tutorial)
It is used like so:
condition ? first_expression : second_expression;
Basically if the statement is true, the first expression is executed, if not, the second is. Generally speaking it is a small shortcut for if/else
blocks, and should be used for only small statements. Nesting the ternary operator is largely frowned upon.
So if args == null || args.Length == 0
Then path = @"C:\GENERIC\SYSTEM\PATH"
, if not, it equals args[1]
It is equivalent to your standard if
block
string path;
if(args == null || args.Length == 0)
{
path = @"C:\GENERIC\SYSTEM\PATH";
}
else
{
path = args[1];
}