# AddFunction(string,System.Func\<TResult, T1>)

Method in [DialogueRunner](https://docs.yarnspinner.dev/2.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner)

## Summary

```csharp
public void AddFunction<TResult, T1>(string name, System.Func<TResult, T1> implementation)
```

## Parameters

| Name                                      | Description |
| ----------------------------------------- | ----------- |
| `string` name                             |             |
| `System.Func<TResult, T1>` implementation |             |

## Type Parameters

| Name | Description                                      |
| ---- | ------------------------------------------------ |
| T1   | The type of the first parameter to the function. |
