Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Named params anyone? It saved me lots of time using them, though not sure if it was available by the time that code was written
-
On a second look, why is one function camelCase while the other is Pascal case?
And "myXXXXX" var names get on my nerves -_- -
n3xus34405y@gitpush I agree "my" variable names are stupid. From the looks of it and you pointing both things out it would make sense if this was copy pasta code.
-
Horkrine1905y@jimshorts Yes it kinda does. When you read the method signature, it implies you should be passing in the higher value first. It then calls the Random.Next() function and passes the values in the incorrect order - and that throws an exception because the minValue cannot be larger than the maxValue
Related Rants
When you're trying to support a legacy product and you come across this goldmine. Stupid shit like this is the reason I want to murder people
(Read the order of the parameters)
rant
code