Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Member group

Invoke

Declaring type: ConstructorReflectionExtensions
Module: System.Runtime.Reflection
Assembly: System.Runtime.dll

Overloads / Variants

Invoke

func self(arguments: Sequence<object?>) -> Result<object, ReflectionError>

Extension from ConstructorReflectionExtensions.Invoke

Copies a sequence of arguments and invokes the retained constructor.

Parameters

Name Type Description
self ConstructorInfo A runtime-backed constructor descriptor.
arguments Sequence<Object?> Non-null argument sequence; caller controls its mutation during copying.

Return value

Result<Object, ReflectionError>

The constructed reference or boxed value, or a ReflectionError, using the same exact-type and access contract as the params overload.

Remarks

Copies arguments before constructor validation and execution. No coercion or overload selection is added. User code and collection-provider Faults remain terminal.

Invoke

func self(params arguments: object?[]) -> Result<object, ReflectionError>

Extension from ConstructorReflectionExtensions.Invoke

Invokes this exact constructor without overload selection.

Parameters

Name Type Description
self ConstructorInfo A retained runtime-backed constructor descriptor.
arguments Object?[] Non-null array with the exact argument count. Values are exact boxed built-in scalars or nongeneric value records, or compatible references/null.

Return value

Result<Object, ReflectionError>

The constructed reference or boxed value, or UnboundMetadata, UnsupportedType, AccessDenied, MissingConstructor or InvalidArguments.

Remarks

No numeric coercion, optional defaults, byref/out, generic owners or private execution. Access and arguments are checked per invocation. Ordinary constructor execution and GC rooting apply; user Faults remain terminal. Construct union cases and carriers separately.