# AddIn class
{: .no_toc }

The contract every addin's main class must implement. One read-only property --- [**Name**](#name) --- that the IDE reads to label the addin in error messages, log lines, and any addin-management UI added later. The IDE never creates an **AddIn** itself; the addin DLL constructs the object inside [`tbCreateCompilerAddin`](/tB/Packages/tbIDE/index.md#building-and-loading-an-addin) and returns it.

```tb check_build
Private Class MyAddIn
    Implements AddIn

    Private WithEvents Host As Host

    Public Sub New(ByVal Host As Host)
        Set Me.Host = Host
    End Sub

    Private Property Get AddIn_Name() As String
        Return "My AddIn"
    End Property
End Class
```

The class implementing **AddIn** is also the natural place to hold every other `WithEvents` reference the addin uses ([**Host**](/tB/Packages/tbIDE/Host.md), each [**Button**](/tB/Packages/tbIDE/Button.md), each [**ToolWindow**](/tB/Packages/tbIDE/ToolWindow.md), an optional [**AddinTimer**](/tB/Packages/tbIDE/AddinTimer.md), …) --- its lifetime is tied to the addin's loaded state.

An addin that needs a newer IDE than the one that loads it can return the package's [**UnsupportedHostAddin**](/tB/Packages/tbIDE/UnsupportedHostAddin.md), an **AddIn** that does nothing.

## Properties

### Name
{: .no_toc }

A short human-readable name for the addin. **String**, read-only. The IDE captures this once when the addin is loaded. The **Add-Ins** menu lists the addin under it; an empty name is drawn as a separator line.

Syntax: *addIn*.**Name** **As String**
