> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor/ks.reactor.kshierarchyobject-1/ks.reactor.kshierarchyobject-1.foreachcallback.md).

# Delegate ksHierarchyObject\<T>.ForEachCallback

Namespace: [KS.Reactor](/reactor/api-reference/ks.reactor.md)\
Assembly: KSCommon.dll

Callback for depth-first searches.

```csharp
public delegate bool ksHierarchyObject<T>.ForEachCallback(T obj)
```

#### Parameters

`obj` T

Object being iterated.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True to iterate the children of the object.
