that whole section, imo, could use a refactor until the language is more complete. established languages don't do that, and your language isn't complete, so until you can knock those other languages off their pedestals you should keep it light and objective with the comparisons.
That is the IDE, but it is not required for compiling. You should actually use C# .NET 6 and see what they are doing to prevent null exceptions. You must explicitly require the assignment of null or you will get warnings in the IDE and compiler. Here is an example:
public MyClass Students { get; set; }
You will need to create a new object before you leave the class or you will get an error. Or, you can use MyClass? instead, and it will give warnings any time you try to use Students without checking for null first. This is done before compiling so you can check for these null references through the IDE. This is a big change for C# and can effectively eliminate null references (object reference not set to an instance of an object) exceptions throughout your application.
lagniappe|2 years ago
ki_|2 years ago
Freebytes|2 years ago
public MyClass Students { get; set; }
You will need to create a new object before you leave the class or you will get an error. Or, you can use MyClass? instead, and it will give warnings any time you try to use Students without checking for null first. This is done before compiling so you can check for these null references through the IDE. This is a big change for C# and can effectively eliminate null references (object reference not set to an instance of an object) exceptions throughout your application.