It is just a matter of feasibility. I know that if I say
int myInt = "5";
I get a compile time error. I want to create compile-time errors or object warnings. So, let's say I have a custom object with several properties. One of the properties cannot be null, otherwise the solution will not compile:
public static class NoNullObjects {
MyClass.cs:
Line
When I build, I want to see:
Error: NotNullObject cannot be set to null. MyClass.cs Line 55.
Is there any way to do this?
source share