Skip to the content.

< Back


GenericClass<T>

Namespace: MyClassLib.SubNamespace

Generic class.

public class GenericClass<T>

Type Parameters

T
The type param.

Inheritance ObjectGenericClass<T>

Constructors

GenericClass()

Initializes a new instance of the GenericClass<T> class.

public GenericClass()

GenericClass(T)

Initializes a new instance of the GenericClass<T> class.

public GenericClass(T param)

Parameters

param T
The generic parameter.

Methods

GetGenericInstance<TSource>()

Gets a new instance of generic param.

public TSource GetGenericInstance<TSource>()

Type Parameters

TSource
The generic param.

Returns

TSource
The new instance.

GetGenericInstance<TSource>(TSource)

Gets a new instance of generic param.

public TSource GetGenericInstance<TSource>(TSource source)

Type Parameters

TSource
The generic param.

Parameters

source TSource
The object source.

Returns

TSource
The new instance.

Map<TSource, TTarget>(TSource, TTarget)

Map object.

public TTarget Map<TSource, TTarget>(TSource source, TTarget target)

Type Parameters

TSource
The source type.

TTarget
The source target.

Parameters

source TSource
The object source.

target TTarget
The target

Returns

TTarget
The mapped object.


< Back