Hi All,
Please explain me following two lines:
if (combined.Length != 0)prefix += appendAnd ? " and " : " ";
In above line what is the use of '?' and ':'
Thanks and regards,
Swapnil.
That is aTernary Expression.
If means,
If the var appendAnd evaluates to True
then perform the operation (+=) with the data directly after the question mark
else
perform the oprtation with the data after the colon :
0 comments:
Post a Comment