편집

다음을 통해 공유


DynamicAttribute Constructors

Definition

Initializes a new instance of the DynamicAttribute class.

Overloads

DynamicAttribute()

Initializes a new instance of the DynamicAttribute class.

DynamicAttribute(Boolean[])

Initializes a new instance of the DynamicAttribute class.

DynamicAttribute()

Source:
DynamicAttribute.cs
Source:
DynamicAttribute.cs
Source:
DynamicAttribute.cs

Initializes a new instance of the DynamicAttribute class.

public:
 DynamicAttribute();
public DynamicAttribute ();
Public Sub New ()

Remarks

When used in an attribute specification, the parameterless constructor is semantically equivalent to DynamicAttribute({ true }), and can be considered a shorthand for that expression. It should therefore only be used on an element of type Object.

Applies to

DynamicAttribute(Boolean[])

Source:
DynamicAttribute.cs
Source:
DynamicAttribute.cs
Source:
DynamicAttribute.cs

Initializes a new instance of the DynamicAttribute class.

public:
 DynamicAttribute(cli::array <bool> ^ transformFlags);
public DynamicAttribute (bool[] transformFlags);
new System.Runtime.CompilerServices.DynamicAttribute : bool[] -> System.Runtime.CompilerServices.DynamicAttribute
Public Sub New (transformFlags As Boolean())

Parameters

transformFlags
Boolean[]

Specifies, in a prefix traversal of a type's construction, which Object occurrences are meant to be treated as a dynamically dispatched type.

Remarks

This constructor is meant to be used on types that are built on an underlying occurrence of Object that is meant to be treated dynamically.

For instance, if C is a generic type with two type parameters, a use of the constructed type C<Object,Object> might be intended to treat the first type argument dynamically and the second typically, in which case the appropriate attribute specification should use a transformFlags value of { false, true, false }.

Applies to