# FunctionTypeBuilder

Class in [Yarn.Compiler](https://docs.yarnspinner.dev/2.4/api/csharp/yarn.compiler)

Inherits from `System.Object`

## Summary

Provides methods for constructing [FunctionType](https://docs.yarnspinner.dev/2.4/api/csharp/yarn/yarn.functiontype) 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](https://docs.yarnspinner.dev/2.4/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype) property to get the final, constructed [FunctionType](https://docs.yarnspinner.dev/2.4/api/csharp/yarn/yarn.functiontype) .

## Methods

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

## Properties

| Name                                                                                                                                                       | Description                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FunctionType](https://docs.yarnspinner.dev/2.4/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype) | Gets the [FunctionType](https://docs.yarnspinner.dev/2.4/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder/yarn.compiler.functiontypebuilder.functiontype) instance constructed by this [FunctionTypeBuilder](https://docs.yarnspinner.dev/2.4/api/csharp/yarn.compiler/yarn.compiler.functiontypebuilder) . |
