namespace System.Runtime.InteropServices {
+ [ComVisible(true)]
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Parameter |
AttributeTargets.ReturnValue, Inherited=false)]
+ [StructLayout (LayoutKind.Sequential)]
public sealed class MarshalAsAttribute : Attribute {
- private UnmanagedType utype;
- public UnmanagedType ArraySubType;
+ /*keep these fields in sync with object-internals.h*/
+#pragma warning disable 169, 414
public string MarshalCookie;
+ [ComVisible(true)]
public string MarshalType;
+
+ [ComVisible(true)]
public Type MarshalTypeRef;
+ public Type SafeArrayUserDefinedSubType;
+
+ private UnmanagedType utype;
+ public UnmanagedType ArraySubType;
+#if !MOONLIGHT
public VarEnum SafeArraySubType;
+#else
+ private int SafeArraySubType;
+#endif
public int SizeConst;
+ public int IidParameterIndex;
public short SizeParamIndex;
- public Type SafeArrayUserDefinedSubType;
-#if NET_2_0
- public int IidParamIndex;
-#endif
+#pragma warning disable 169, 414
public MarshalAsAttribute (short unmanagedType) {
utype = (UnmanagedType)unmanagedType;
public UnmanagedType Value {
get {return utype;}
}
+
+ internal MarshalAsAttribute Copy ()
+ {
+ return (MarshalAsAttribute)this.MemberwiseClone ();
+ }
}
}