PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / Reference­Type­Serializer Class / Reference­Type­Serializer Methods / Reference­Type­Serializer.​Create­Instance Method

ReferenceTypeSerializer.CreateInstance Method

Creates an instance of the given type.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public abstract Object CreateInstance(
	Type type,
	IArgumentsReader constructorArguments
)

Parameters

type
Type: System.Type
Type of the instance to be created.
constructorArguments
Type: PostSharp.Serialization.IArgumentsReader
Gives access to arguments required to create the instance.

Return Value

Type: Object
An instance of type type initialized using constructorArguments.

Implements

ISerializer.CreateInstance(Type, IArgumentsReader)
See Also