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 192 posts 509 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!

Please Sign in or register to post replies

Write your reply to:

Draft