* AutomationProxyAttribute.cs
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / MarshalAsAttribute.cs
1 //
2 // System.Runtime.InteropServices.MarshalAsAttribute.cs
3 //
4 // Author:
5 //   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
6 //
7
8 using System;
9
10 namespace System.Runtime.InteropServices {
11
12         [AttributeUsage (AttributeTargets.Field | AttributeTargets.Parameter | 
13                          AttributeTargets.ReturnValue, Inherited=false)]
14         public sealed class MarshalAsAttribute : Attribute {
15                 private UnmanagedType utype;
16                 public UnmanagedType ArraySubType;
17                 public string MarshalCookie;
18                 public string MarshalType;
19                 public Type MarshalTypeRef;
20                 public VarEnum SafeArraySubType;
21                 public int SizeConst;
22                 public short SizeParamIndex;
23                 public Type SafeArrayUserDefinedSubType;
24
25                 public MarshalAsAttribute (short unmanagedType) {
26                         utype = (UnmanagedType)unmanagedType;
27                 }
28                 public MarshalAsAttribute( UnmanagedType unmanagedType) {
29                         utype = unmanagedType;
30                 }
31                 public UnmanagedType Value {
32                         get {return utype;}
33                 }
34                 
35         }
36 }