ReflectionServiceHasParameterlessPublicConstructor Method |
Determines whether the specified type defines a public parameterless constructor.
Namespace: Altaxo.Main.ServicesAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntaxpublic 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
Booleantrue if the type has a public parameterless constructor; otherwise, false.
RemarksThis 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