System.Runtime.InteropServices.MarshalAsAttribute.Value Property

Gets the System.Runtime.InteropServices.UnmanagedType value the data is to be marshaled as.

Syntax

public UnmanagedType Value { get; }

Value

The System.Runtime.InteropServices.UnmanagedType value indicating how the data is to be marshaled.

Remarks

This value is used with System.Runtime.InteropServices.MarshalAsAttribute to indicate how types should be marshaled between managed and unmanaged code. In some cases, you can use this field with certain UnmanagedType enumeration members. For UnmanagedType.CustomMarshaler and UnmanagedType.ByValArray, you must use additional named parameters.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0