KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicates: 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? Whats wrong with the below public double? Progress { get; set; } Progress = null; // works Progress = 1; // works Progress = (1 == 2) ? 0.0 : null; // fails Type of conditional expression cannot be determined because there is no implicit conversion between 'double' and '<null>'
Tags (comma-separated)
Save Edits
Cancel