I have following field in my class:
public bool? EitherObject1OrObject2Exists => ((Object1 != null || Object2 != null) && !(Object1 != null && Object2 != null)) ? true : null;
But in Visual Studio I get an IntelliSense error that there cannot be a conversion between "bool" and "NULL" even though the field is nullable. What do I do wrong? And is there a cleaner way to check if either one of two objects is not null but one of them must be null?