Class StdLibClassAttribute
Marks an interface as the internal representation of one of the standard library's predefined class modules (MS-VBAL §6.1.3).
[AttributeUsage(AttributeTargets.Interface)]
public sealed class StdLibClassAttribute : Attribute
- Inheritance
-
StdLibClassAttribute
- Inherited Members
Remarks
A predefined class module is a class module: it is a nameable type an As clause can bind,
and its members resolve only through an instance of it.
The marker is what makes the class discoverable - every VBA project has the standard library whether or not anything references it (RD-VBAL §6.1), so nothing declares the set of classes a workspace gets, and the set is read off the SDK itself.
Constructors
StdLibClassAttribute(string?)
Marks an interface as the internal representation of one of the standard library's predefined class modules (MS-VBAL §6.1.3).
public StdLibClassAttribute(string? name = null)
Parameters
namestringThe class's name in VBA source, when it differs from the conventional one.
Remarks
A predefined class module is a class module: it is a nameable type an As clause can bind,
and its members resolve only through an instance of it.
The marker is what makes the class discoverable - every VBA project has the standard library whether or not anything references it (RD-VBAL §6.1), so nothing declares the set of classes a workspace gets, and the set is read off the SDK itself.
Properties
IsCreatable
Whether VBA source can create an instance of this class with New.
public bool IsCreatable { get; init; }
Property Value
Remarks
true by default - New Collection and New RegExp are both valid. A class
whose instances only ever come from the environment, the way an ErrObject comes from the
Err function, sets this to false so that New on it is reported rather than
resolved.
Name
The class's name in VBA source, or null for the conventional one: the declaring
interface's name without its IStd prefix and Class suffix, so
IStdCollectionClass is Collection.
public string? Name { get; }