I have a few co-workers who implement if-else logic in a way I've not seen before, and it kind of baffles me.
They write...
If <someCondition> Then
Else
Console.WriteLine("Hello, World")
...instead of
If Not <someCondition> Then
Console.WriteLine("Hello, World")
This got me thinking
Is there any difference between the two approaches? Is one approach more efficient than the other?
Aucun commentaire:
Enregistrer un commentaire