> 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.0/api/csharp/yarn/yarn.library.md).

# Library

Class in [Yarn](/2.0/api/csharp/yarn.md)

Inherits from `System.Object`

## Summary

A collection of functions that can be called from Yarn programs.

```csharp
public class Library
```

## Remarks

You do not create instances of this class yourself. The [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) class creates one of its own, which you can access via the [Library](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.library.md) property.

## Methods

| Name                                                                                                                                | Description                                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| [DeregisterFunction(string)](/2.0/api/csharp/yarn/yarn.library/yarn.library.deregisterfunction.md)                                  | Removes a function from the Library.                                                                                    |
| [FunctionExists(string)](/2.0/api/csharp/yarn/yarn.library/yarn.library.functionexists.md)                                          | Gets a value indicating whether this [Library](/2.0/api/csharp/yarn/yarn.library.md) contains a function named `name` . |
| [GetFunction(string)](/2.0/api/csharp/yarn/yarn.library/yarn.library.getfunction.md)                                                | Returns a `System.Delegate` with a given name.                                                                          |
| [ImportLibrary(Library)](/2.0/api/csharp/yarn/yarn.library/yarn.library.importlibrary.md)                                           | Loads functions from another [Library](/2.0/api/csharp/yarn/yarn.library.md) .                                          |
| [RegisterFunction(string,Delegate)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-7.md)                           | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-1.md)                               | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func\<T1, TResult>)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-2.md)                 | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func\<T1, T2, TResult>)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-3.md)             | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func\<T1, T2, T3, TResult>)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-4.md)         | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func\<T1, T2, T3, T4, TResult>)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-5.md)     | Registers a new function that returns a value, which can be called from a Yarn program.                                 |
| [RegisterFunction(string,Func\<T1, T2, T3, T4, T5, TResult>)](/2.0/api/csharp/yarn/yarn.library/yarn.library.registerfunction-6.md) | Registers a new function that returns a value, which can be called from a Yarn program.                                 |

## See Also

* [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md): Co-ordinates the execution of Yarn programs.
