MarshalAsAttribute

MarshalAsAttribute ECMA 1.0

System.Runtime.InteropServices (mscorlib.dll) sealed class

This optional attribute is used to explicitly specify the unmanaged type a parameter, field, or return value should be marshaled to. If you do not specify this attribute, .NET uses the type's default marshaler . The UnmanagedType enumeration contains the unmanaged types you can marshal to with this attribute.

 public sealed class  MarshalAsAttribute  : Attribute {  // Public Constructors  public  MarshalAsAttribute  (short   unmanagedType   );    public  MarshalAsAttribute  (UnmanagedType   unmanagedType   );  // Public Instance Fields  public UnmanagedType  ArraySubType  ;    public string  MarshalCookie  ;    public string  MarshalType  ;    public Type  MarshalTypeRef  ;    public VarEnum  SafeArraySubType  ;    public Type  SafeArrayUserDefinedSubType  ;    public int  SizeConst  ;    public short  SizeParamIndex  ;  // Public Instance Properties  public UnmanagedType  Value  {get; } } 

Hierarchy

System.Object System.Attribute MarshalAsAttribute

Valid On

Field, Parameter, ReturnValue



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net