Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm just trying to replicate warren's RSS Razor script with a few modifications. Something strikes me as strange.
Should it be possible for a node to have more children than descendents. e.g. I just tried...
<p>@Model.AncestorOrSelf(1).Decendents.Count()</p> <p>@Model.AncestorOrSelf(1).Children.Count()</p>
I got the following:
0
13
But I thought that the set of all descendents of a node was a superset of the set of all children, so the number of decendents should always be equal to or greater than the number of children.
I really hope it's just not a spelling mistake Decendents() vs Descendants()
Cheers,
/Dirk
The level of embarssement I feel right now...
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Problem with Razor collections
I'm just trying to replicate warren's RSS Razor script with a few modifications. Something strikes me as strange.
Should it be possible for a node to have more children than descendents. e.g. I just tried...
<p>@Model.AncestorOrSelf(1).Decendents.Count()</p>
<p>@Model.AncestorOrSelf(1).Children.Count()</p>
I got the following:
0
13
But I thought that the set of all descendents of a node was a superset of the set of all children, so the number of decendents should always be equal to or greater than the number of children.
I really hope it's just not a spelling mistake Decendents() vs Descendants()
Cheers,
/Dirk
The level of embarssement I feel right now...
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.