
## Apply {#apply}

Applies specified algorithm to each task of a tree.

**Returns:** static void Aspose::Tasks::Util::

```cpp
Apply(const System::SharedPtr< Task > & root, const System::SharedPtr< ITreeAlgorithm < System::SharedPtr< Task >>> & alg, int32_t level)
```

| Parameter | Description |
| --- | --- |
| root | Root of the tree |
| alg | Applied algorithm. |
| level | Level of the root task. |

