mögliche Dubletten:
Why can't I set a nullable int to null in a ternary if statement?
Nullable types and the ternary operator. Why won't this work?Was ist falsch daran, nullable double auf null zu setzen?
Was stimmt nicht mit dem unten
public double? Progress { get; set; }
Progress = null; // works
Progress = 1; // works
Progress = (1 == 2) ? 0.0 : null; // fails
Art des bedingten Ausdrucks kann nicht bestimmt werden, weil es keine implizite ist Konvertierung zwischen ‚double‘ und ‚< null>‘
dup http://stackoverflow.com/questions/2766932/why-cant-i-set-a-nullable-int-to-null-in- a-ternary-if-statement – pavanred