softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
52 stars 64 forks source link

Consider using nullable reference types #188

Open vanillajonathan opened 3 years ago

vanillajonathan commented 3 years ago

https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references

Benefits will increase more robustness with less chance of NullReferenecException at runtime, a clearer API with less ambiguity that makes it obvious what can be null and what cannot be null.

richardrandak commented 3 years ago

Is this beneficial also when using .NET Standard 2.0?

vanillajonathan commented 3 years ago

It is an optional feature of C# 8.0 so it has nothing to do with the .NET Standard.

It is beneficial for you as the developer of this project. It also beneficial users of this assembly when they use it together in a project that have enabled C# 8.0 and enabled nullable references types in their project because then strict nullability gets enforced. It also usable for all users even if they don't have C# 8.0 or nullable reference types enabled in their project because when using F12 in Visual Studio to inspect a class it lets them see which properties are marked as nullable.