S
ssg31415926
In the past, in other languages, I was taught to write tests like
this:
if (bob == "fool")
:
sometimes, in code samples, I see:
if ("fool" == bob)
:
Is there a reason for this (to me) reversal in C# or is it just a
house-style thing?
Please note, I'm not necessarily talking about string comparisions,
just the order between the object/value being tested and the
comparison object/value.
this:
if (bob == "fool")
:
sometimes, in code samples, I see:
if ("fool" == bob)
:
Is there a reason for this (to me) reversal in C# or is it just a
house-style thing?
Please note, I'm not necessarily talking about string comparisions,
just the order between the object/value being tested and the
comparison object/value.