1
lorentz
1y

My new favourite RUNTIME c# error, evidently thrown by the standard library because the string is not present in the project:

"no parameterless constructor defined for this object"

Comments
  • 2
    1. why would you do this
    2. why not take 5 steps back and do something that doesn't need reflection when you're about to write this
    3. why not NAME THE FUCKING TYPE IN THE MESSAGE
  • 1
    - parent class has no parameterless ctor
    - descendants must have parameterless ctor

    I am forced to pass null to a parameter that is not explicitly documented as nullable. I'm gonna set something on fire and you best hope it's a cigarette.
  • 0
    @donkulator Why is the ability to pass a value that's not supported desirable?
  • 0
    @donkulator Arguably container-style Option would've been a better choice because it works better with generics, but I think null is a big enough problem that a solution that works most of the time is still desirable.
Add Comment