Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Luke Alderton 191 posts 508 karma points
    Dec 12, 2012 @ 15:20
    Luke Alderton
    0

    Using lambada expression in .Where() statement not working

    I'm trying to create a function that gets all the current nodes siblings however im gettign the error "delegate 'System.Func<umbraco.MacroEngines.DynamicNode,int,bool>' does not take 1 arguments" when using the below code:

    public List GetNodeSiblings(DynamicNode current)
    {
        String nodeTypeAlias = current.NodeTypeAlias;
    
        return current.Parent.Descendants(nodeTypeAlias).Where(x => x.GetProperty("umbracoNaviHide").Value != "1">)
            .OrderByDescending(x => x.GetProperty("updateDate").Value).ToList();
    }

    Any help would be appreciated and thanks in advance!

  • 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.

Please Sign in or register to post replies