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
-
pitaya4165y@SortOfTested I meant that you can do:
String var = "Hello!, " + null + "world!";
With no problem at all. Like, why?! -
@pitaya4
It's too busy screaming at you that var is a keyword to care about the null. -
pitaya4165y@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.
-
@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. -
Because C# is the bastard child of Oracle's and Microsoft's one night stand that Microsoft got custody of and totally misraised.
-
@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.
Related Rants
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!!!!!!!!!!!!
rant
csharp