> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.withreturntype.md).

# WithReturnType(IType)

Method in [FunctionTypeBuilder](/3.1/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md)

## Summary

Sets the [ReturnType](/3.1/api/csharp/yarn/yarn.functiontype/yarn.functiontype.returntype.md) of the [FunctionType](/3.1/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) .

```csharp
public FunctionTypeBuilder WithReturnType(IType returnType)
```

## Parameters

| Name                                                        | Description                               |
| ----------------------------------------------------------- | ----------------------------------------- |
| [Yarn.IType](/3.1/api/csharp/yarn/yarn.itype.md) returnType | The return type to apply to the function. |

## Returns

The [FunctionTypeBuilder](/3.1/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md) instance that received this method call.
