Skip to main content

IModel.As(string,bool) Method

Namespace: NextDesign.Core

Description

Checks if this instance is compatible with the specified class type.
Returns True if this instance is an instance of the specified class or a subclass of it.

See the IModel documentation for how to specify class names and fuzzy matching options.

Argument

NameTypeDescription
classNamestringClass Name
Specifies the name or fully qualified name of the class.
If null or an empty string is specified, this method evaluates to False.
If no class with the specified name is found, this method evaluates to False.
fuzzyboolFuzzy Match Option
Whether to treat the className argument as the name of the class rather than the fully qualified name.
If False, it evaluates as specifying a class whose fully qualified name matches className.
If True, it evaluates as specifying a class whose class name matches className.
If multiple matches, this method evaluates to True if any one of them is an instance.

The default value is True.

Return value

  • bool