This documentation is archived and is not being maintained.

MarshalAsAttribute Members

MarshalAsAttribute overview

Public Constructors

public constructorMarshalAsAttribute Constructor Overloaded. Initializes a new instance of the MarshalAsAttribute class.

Public Fields

public fieldArraySubType Specifies the element type of the unmanaged UnmanagedType.LPArray or UnmanagedType.ByValArray.
public fieldMarshalCookie Provides additional information to a custom marshaler.
public fieldMarshalType Specifies the fully qualified name of a custom marshaler.
public fieldMarshalTypeRef Implements MarshalAsAttribute.MarshalType as a type.
public fieldSafeArraySubType Indicates the element type of the UnmanagedType.SafeArray.
public fieldSafeArrayUserDefinedSubType Indicates the user-defined element type of the UnmanagedType.SafeArray.
public fieldSizeConst Indicates the number of elements in the fixed-length array or the number of characters (not bytes) in a string to import.
public fieldSizeParamIndex Indicates which parameter contains the count of array elements, much like size_is in COM, and is zero-based.

Public Properties

public propertyTypeId (inherited from Attribute) When implemented in a derived class, gets a unique identifier for this Attribute.
public propertyValue Gets the UnmanagedType value the data is to be marshaled as.

Public Methods

public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodGetHashCode (inherited from Attribute) Overridden. Returns the hash code for this instance.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodIsDefaultAttribute (inherited from Attribute) When overridden in a derived class, returns an indication whether the value of this instance is the default value for the derived class.
public methodMatch (inherited from Attribute) When overridden in a derived class, returns a value indicating whether this instance equals a specified object.
public methodToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

MarshalAsAttribute Class | System.Runtime.InteropServices Namespace