* CurrencyWrapper.cs: Fix file name.
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / HandleRef.cs
1 //
2 // System.Runtime.InteropServices.HandleRef
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) 2003 Tim Coleman
8
9 using System;
10
11 namespace System.Runtime.InteropServices {
12         public struct HandleRef {
13
14                 #region Fields
15
16                 object wrapper;
17                 IntPtr handle;
18
19                 #endregion // Fields
20
21                 #region Constructors
22
23                 public HandleRef (object wrapper, IntPtr handle)
24                 {
25                         this.wrapper = wrapper;
26                         this.handle = handle;
27                 }
28
29                 #endregion // Constructors
30
31                 #region Properties
32
33                 public IntPtr Handle {
34                         get { return handle; }
35                 }
36
37                 public object Wrapper {
38                         get { return wrapper; }
39                 }
40
41                 #endregion // Properties
42
43                 #region Type Conversions
44
45                 public static explicit operator IntPtr (HandleRef value)
46                 {
47                         return value.Handle;
48                 }
49
50                 #endregion // Type Conversions
51         }
52 }