# Sandbox.Internal.TypeLibrary.Create

## Overload 1

```csharp
object Create(string name, System.Type targetType, object[] args = null)
```

Create a type instance by name and is assignable to given type, with optional arguments for its constructor.

### Parameters

- `name` (`string`): Name of the type to create.
- `targetType` (`System.Type`): Type "constraint", as in the type instance must be assignable to this given type.
- `args` (`object[]`), default `null`: Optional arguments for the constructor of the selected type.

### Returns

`object`

## Overload 2

```csharp
T Create(System.Type type, object[] args = null)
```

Create type instance from type.

### Parameters

- `type` (`System.Type`)
- `args` (`object[]`), default `null`

### Returns

`T`

## Overload 3

```csharp
T Create(string name = null, bool complainOnMissing = True)
```

Create a type instance by name and is assignable to given type.

### Parameters

- `name` (`string`), default `null`: Name of the type to create.
- `complainOnMissing` (`bool`), default `True`: Display a warning when requested type name was not found.

### Returns

`T`

## Overload 4

```csharp
T Create(string name, object[] args, bool complainOnMissing = True)
```

Create a type instance by name and is assignable to given type.

### Parameters

- `name` (`string`): Name of the type to create.
- `args` (`object[]`)
- `complainOnMissing` (`bool`), default `True`: Display a warning when requested type name was not found.

### Returns

`T`

## Overload 5

```csharp
T Create(int ident)
```

Create a type instance by its identity. See `M:Sandbox.Internal.TypeLibrary.GetIdent(System.Type)`.

### Parameters

- `ident` (`int`)

### Returns

`T`

Declared in [Sandbox.Internal.TypeLibrary](/api/Sandbox.Internal.TypeLibrary).
Assembly: `Sandbox.Reflection`.
