Düzenle

Aracılığıyla paylaş


Factory<TParam1,TInstance> Delegate

Definition

Creates an instance of TInstance.

public delegate TInstance Factory<in TParam1,out TInstance>(TParam1 param1);
type Factory<'TParam1, 'Instance> = delegate of 'TParam1 -> 'Instance
Public Delegate Function Factory(Of In TParam1, Out TInstance)(param1 As TParam1) As TInstance 

Type Parameters

TParam1

The parameter type.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
TInstance

The instance type.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

Parameters

param1
TParam1

Return Value

TInstance

The instance.

Applies to