Skip to content

Children<TNode>.SingleOfType Method ​

Definition ​

Returns the only node in the collection of the specified type. Throws if there is not exactly one node in the collection of the specified type.

c#
public TChild SingleOfType<TChild>()
   where TChild : TNode;

View source

Type Parameters ​

NameDescription
TChildThe type of the node to return.

Returns ​

TChild

The single node in the collection of type TChild.