ReSharper 2016.3 Help

Code Inspection: Ternary expression has identical true and false branches

This one’s fairly obvious. The following expression:

return condition ? result : result;
Return If(condition, result, result)

is identical to the following

return result;
Return result

since the condition does not affect what is being returned.

See Also

Last modified: 20 January 2017