Click or drag to resize

ReflectionServiceHasParameterlessPublicConstructor Method

Determines whether the specified type defines a public parameterless constructor.

Namespace: Altaxo.Main.Services
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static bool HasParameterlessPublicConstructor(
	Type type
)

Parameters

type  Type
The type to inspect for a public constructor that takes no parameters. Cannot be null.

Return Value

Boolean
true if the type has a public parameterless constructor; otherwise, false.
Remarks
This method is useful when creating instances of types dynamically, such as during reflection-based object creation. Only public parameterless constructors are considered; non-public constructors are ignored.
See Also