Who to force a type
Hello,
In a C# class i have this property
And on the same class have this methode
C# would not compile because Type1 could be null and not Value2
How to edit test for granted Value1 is of type Type1 ?
I have try
Thanks at advence
In a C# class i have this property
public Type? Value1;And on the same class have this methode
C# would not compile because Type1 could be null and not Value2
How to edit test for granted Value1 is of type Type1 ?
I have try
Value1.HasValue in the if but that do the sameThanks at advence