Why am I seeing different behavior between 'if' and ternary with linq?
===

I have a situation where I was using a ternary operator to determine whether or not an IEnumerable is null, and it was not behaving as I would expect.         

If I do this:


    var children = clickedItem.Children != null ? clickedItem.Children.ToArray() : null;

then I receive an argument null exception ("source cannot be null") which indicates that the `.ToArray()` occurred despite the null check.

If I change this to (seemingly) identical logic:

    var children = clickedItem.Children;
    if (children != null) children = children.ToArray();

then the error disappears. Does the ternary operator not short-circuit as I always imagined it did?