2003-11-18 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
[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 | AttributeTargets.ReturnValue)]
13         public sealed class MarshalAsAttribute : Attribute {
14                 private UnmanagedType utype;
15                 public UnmanagedType ArraySubType;
16                 public string MarshalCookie;
17                 public string MarshalType;
18                 public Type MarshalTypeRef;
19                 public VarEnum SafeArraySubType;
20                 public int SizeConst;
21                 public short SizeParamIndex;
22                 public Type SafeArrayUserDefinedSubType;
23
24                 public MarshalAsAttribute (short unmanagedType) {
25                         utype = (UnmanagedType)unmanagedType;
26                 }
27                 public MarshalAsAttribute( UnmanagedType unmanagedType) {
28                         utype = unmanagedType;
29                 }
30                 public UnmanagedType Value {
31                         get {return utype;}
32                 }
33                 
34         }
35 }