Firstly, there is no such requirement, and therefore the premise of whether or not they are immune to the requirement is null. Code is certainly very helpful, and sometimes necessary to frame a question clearly. A question might fall into "not clear" if it lacks BOTH code and unambiguous description. It only needs one of those things, but often when in doubt, attempting to provide both a code attempt and an unambiguous description ensures you have successfully framed your question through at least one of those mechanisms.
The discussion of this requirement is covered in my meta question here: Is there really a universal code requirement?Is there really a universal code requirement?
Most responders agreed that there is no such requirement, but it is VERY STRONGLY encouraged. Answers lacking code will sometimes be unclear and be candidates for closing as a result of the lack of clarity. Lack of code in itself is not sufficient reason for closing.
In this case I think the description was clear and unambiguous enough that code was not needed. This is exemplified in the fact that the answers were all consistent in their behavior, despite taking different approaches.
If the user was unaware of the Nullable.Compare
function, it would have been a reverse search problem that wouldn't have likely turned up that result.
So any other attempt to show code that accomplished the same without leveraging that function would have been obtuse, and ultimately would have been unnecessary fluff. The existing answers would have still applied, and would not have directly addressed the asker's attempt. If anything it would perhaps elicit some rude "you're doing it wrong" comments.
That said, I think they probably should have played it safe and included code that accomplished the same. We should never underestimate our ability to create ambiguous statements in human languages like English. Even if it was a couple of if/else's that accomplish the same behavior, then asked if there was a more elegant approach, that would have ensured everyone was understanding exactly what the asker's goal was.
It is a great question and is clearly framed and adds value to the community, which is exactly what SO is about. I don't see any reason to downvote it simply because it lacked a code attempt, because that fact doesn't diminish the value of the question or the fact that it was clearly framed.