KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am curious as to why an implicit cast fails in... int? someValue = SomeCondition ? ResultOfSomeCalc() : null; and why I have to perform an explicit cast instead int? someValue = SomeCondition ? ResultofSomeCalc() : (int?)null; It seems to me that the compiler has all the information it need to make an implicit casting decision, no?
Tags (comma-separated)
Save Edits
Cancel