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
-
Before anyone says it, I know this probably has some historical reason and you can't change it because it would break compatibility... BUT IT STILL ANNOYS ME
-
It gets worse if you consider that ArgumentOutOfRangeException inherits from ArgumentException...
-
@electrineer I don't know, I think they just store the strings and that's it.
It would be quite the irony to get an ArgumentException when throwing an ArgumentException... -
@LotsOfCaffeine I meant it's an exception as in the sense of not conforming to the general order.
-
@SortOfTested It's one of those things that just piss me off.
Like there's no explanation for this.
ArgumentOutOfRangeException inherits from ArgumentException... so did the dev who wrote the contructor go
public ArugmentOutOfRangeException(string paramName, string message)
: base(message, paramName)
{ }
to achieve this? Like how does that not ring a huge bell? -
@electrineer I didn't copy and paste I wrote that, as you can see by the fancy typo :|
maybe not the best idea since it'a almost 1 am -
@LotsOfCaffeine lol, that was my answer to your comment about why it didn't ring a huge bell
-
@LotsOfCaffeine @electrineer
Also don't forget that there are developers who intentionally mix up things like this, as well as aliased to reduce the possibility of accidentally using the wrong thing. -
@SortOfTested does it matter in this case though, as both arguments are strings?
-
@electrineer
It matters slightly more in the MS toolchain where everything obsessively autocompletes symbols. It was also written when caffeine was still a sperm, so there is that 🤣
Related Rants
Hey can I talk to whoever made these constructors at the .net foundation/microsoft?
I'd like to... talk
rant
dotnet
c#