> 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/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md).

# FunctionTypeBuilder

Class in [Yarn.Compiler](/2.5/api/csharp/yarn.compiler.md)

Inherits from `System.Object`

## Summary

Provides methods for constructing [FunctionType](/2.5/api/csharp/yarn/yarn.functiontype.md) objects.

```csharp
public class FunctionTypeBuilder
```

## Remarks

To use this class, create an instance of it, and call the `With` -prefixed methods to set properties. When you're done, access the [FunctionType](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) property to get the final, constructed [FunctionType](/2.5/api/csharp/yarn/yarn.functiontype.md) .

## Methods

| Name                                                                                                                                         | Description                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [WithParameter(IType)](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.withparameter.md)   | Adds a new parameter of type `parameterType` to the [FunctionType](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) .                                                  |
| [WithReturnType(IType)](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.withreturntype.md) | Sets the [ReturnType](/2.5/api/csharp/yarn/yarn.functiontype/yarn.functiontype.returntype.md) of the [FunctionType](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) . |

## Properties

| Name                                                                                                                              | Description                                                                                                                                                                                                                                                         |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FunctionType](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) | Gets the [FunctionType](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype.md) instance constructed by this [FunctionTypeBuilder](/2.5/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder.md) . |
