15

Hey can I talk to whoever made these constructors at the .net foundation/microsoft?

I'd like to... talk

Comments
  • 6
    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
  • 5
    It gets worse if you consider that ArgumentOutOfRangeException inherits from ArgumentException...
  • 5
    How ironic that one of the argument orders must be an exception
  • 2
    @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...
  • 4
    I'm too old to get twisted by stuff like that 😋
  • 2
    @LotsOfCaffeine I meant it's an exception as in the sense of not conforming to the general order.
  • 2
    @electrineer oh that flew by me at light speed
  • 2
    @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?
  • 2
    @LotsOfCaffeine maybe copy paste from somewhere else
  • 1
    @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
  • 1
    @LotsOfCaffeine lol, that was my answer to your comment about why it didn't ring a huge bell
  • 1
    @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.
  • 1
    @SortOfTested does it matter in this case though, as both arguments are strings?
  • 3
    @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 🤣
Add Comment