?? operator

return ((HomesContext)HttpContext.Current.Items[_contextKey]) ?? new HomesContext();

resharper complains that

"Cannot apply operator '??' to operands of type 'HomesContext' and 'HomesContext'"

code compiles.

1 comment
Comment actions Permalink

I have found the same. I have a tracker entry at http://www.intellij.net/forums/thread.jsp?forum=35&thread=175915#4965467
that may be the same problem.

Cheers

Sean

return ((HomesContext)HttpContext.Current.Items[_contextKey]) ?? new
HomesContext();

resharper complains that

"Cannot apply operator '??' to operands of type 'HomesContext' and
'HomesContext'"

code compiles.



0

Please sign in to leave a comment.