6
pitaya4
74d

Fuck C# for real, like why in the FUCK DO YOU NOT AT LEAST THROW A FUCKING EXCEPTION WHEN I TRY TO CONCENTRATE A STRING WITH NULL, I SPENT 40 MINUTES DEBUGGING THIS SHIT JESUS FUCK

Edit, note: I'm having classes that return null when they don't find something. Why is it so hard for the fucking compiler to at least warn me or some shit!!!!!!!!!!!!

Comments
  • 10
    Nullables. Null conditional. Null coalescence. Get them, git gud.
  • 0
    @SortOfTested I meant that you can do:

    String var = "Hello!, " + null + "world!";

    With no problem at all. Like, why?!
  • 12
    @pitaya4
    It's too busy screaming at you that var is a keyword to care about the null.
  • 0
    @SortOfTested It was an example snippet
  • 3
    @SortOfTested my sides 🤣🤣🤣
  • 5
    @AleCx04
    I mean TFW the compilation error is in another castle.
  • 0
    @SortOfTested Except.. I just told you that was just a snippet and not what I'm using in the program, and if I was - VS would have pointed that out.
  • 6
    @pitaya4
    The problem you're pointing out isn't C#. C# states you have types, and you have operator overloading.

    The framework defines String. String can be null. String defines an operator behavior for plus that can accept a null value, because strings can be null. The string class throws an null ref exception.

    The compiler and language did exactly what they advertised. Your problem is with the framework. Your error is in another castle.
  • 0
    Because C# is the bastard child of Oracle's and Microsoft's one night stand that Microsoft got custody of and totally misraised.
  • 4
    @Ranchu
    Oracle never had anything to do with C#. It vastly predated Oracle owning java. Anders Hejlsberg left Borland/Embarcadero software from the Delphi team, went to Microsoft because they told him he could make the version of Delphi he always wanted.
Add Comment