Obj.ToEnumerable() instead of Enumerable.From()

Nov 3, 2014 at 2:00 PM
Edited Nov 3, 2014 at 2:05 PM
Is there a reeason why you haven't extended Object (or Array) with a ToEnumerable protoype function ??

the syntax (and writing thereof) would be more fluent:

var res = obj.ToEnumerable().OrderBy("$.prop").ToArray()

EDIT:

i just found out that there already is a toEnumerable() method on Dictionaries..

obj.asEnumerable() would work just as good...