MarshalUsingAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attribute used to provide a custom marshaller type or size information for marshalling.
public ref class MarshalUsingAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue, AllowMultiple=true)]
public sealed class MarshalUsingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue, AllowMultiple=true)>]
type MarshalUsingAttribute = class
inherit Attribute
Public NotInheritable Class MarshalUsingAttribute
Inherits Attribute
- Inheritance
- Attributes
Remarks
This attribute is recognized by the runtime-provided source generators for source-generated interop scenarios. It is not used by the interop marshalling system at runtime.
Constructors
MarshalUsingAttribute() |
Initializes a new instance of MarshalUsingAttribute that provides only size information. |
MarshalUsingAttribute(Type) |
Initializes a new instance of MarshalUsingAttribute that provides a native marshalling type and optionally size information. |
Fields
ReturnsCountValue |
A constant string that represents the name of the return value for CountElementName. |
Properties
ConstantElementCount |
If a collection is constant size, gets or sets the size of the collection when marshalling from unmanaged to managed. |
CountElementName |
Gets or sets the name of the parameter that will provide the size of the collection when marshalling from unmanaged to managed, or ReturnsCountValue if the return value provides the size. |
ElementIndirectionDepth |
Gets or sets the indirection depth this marshalling info is provided for. |
NativeType |
Gets the marshaller type used to convert the attributed type from managed to native code. |
TypeId |
When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
Methods
Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute) |
GetHashCode() |
Returns the hash code for this instance. (Inherited from Attribute) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
IsDefaultAttribute() |
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute) |
Match(Object) |
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |