I have a query about some code I am using:
List<INode> nodes = Node.GetCurrent().Parent.ChildrenAsList.FindAll(n => n.NodeTypeAlias == "Job")
foreach (Node job in nodes)
{
MakeJobSummary(job, ref counter);
}
Is this going to create any problems as I am foreaching through the INode list but using them as Node (which inherits from INode)
I need to use the Node type as it has a few properties that are set from the values passed in through the INode and I can’t see an easy way to get a list of Nodes from the parent object.
You could do it like this to ensure that the INode is in fact a Node.