Campo MarshalAsAttribute.MarshalTypeRef
Implementa MarshalAsAttribute.MarshalType como um tipo.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (em mscorlib.dll)
Sintaxe
[ComVisibleAttribute(true)]
public Type MarshalTypeRef
public:
[ComVisibleAttribute(true)]
Type^ MarshalTypeRef
[<ComVisibleAttribute(true)>]
val mutable MarshalTypeRef : Type
<ComVisibleAttribute(True)>
Public MarshalTypeRef As Type
Valor do Campo
Type: System.Type
Comentários
You can use either the F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalTypeRef or F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalType field to specify a custom marshaler type for the attributed parameter, field, or return type. The F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalTypeRef field allows easier usage of F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalType by shortening the syntax. In the following example, the first line represents syntax using F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalType and the second line represents syntax using F:System.Runtime.InteropServices.MarshalAsAttribute.MarshalTypeRef.
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Assembly, NameSpace.TypeName")]
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(NameSpace.TypeName)]
You can set a T:System.Type object using typeof in C#, GetType in Visual Basic, or typeid in C++. For additional information about creating and using custom marshalers, see Custom Marshaling.
Informações de Versão
Plataforma Universal do Windows
Disponível desde 8
.NET Framework
Disponível desde 1.1
Biblioteca de Classes Portátil
Com suporte no: plataformas portáteis do .NET
Silverlight
Disponível desde 2.0
Windows Phone Silverlight
Disponível desde 7.0
Windows Phone
Disponível desde 8.1
Confira Também
MarshalType
Classe MarshalAsAttribute
Namespace System.Runtime.InteropServices
Retornar ao início