c# - How to use OrderBy in Linq using xpath -


i have 2 ienumerable<xpathnavigator> , want sort child value.

item1 = xpathnavigator item in iterator1 select item;   item2 = xpathnavigator item in iterator2 select item;  item1 = item1.union(item2);  item1.orderby(res => int.parse(getnavigatorvalue(res, "./item[@value='parentid']")));  static string getnavigatorvalue(xpathnavigator iterator, string xpath) {     xpathnodeiterator inner = iterator.select(xpath);    inner.movenext();    return inner.current.value; } 

it doesn't work.

how use orderby in linq if need sort xpath?

thanks, user460397

is problem? shouldn't be

item1 = item1.orderby( ... ); 

?


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -