Skip to content

Commit

Permalink
Added an implicit operator to convert ByReference<T> to IntPtr. This …
Browse files Browse the repository at this point in the history
…solves a problem where ByRef properties are being created, but I don't think its the right solution.

Signed-off-by: Steve <amn3sia@gmail.com>
  • Loading branch information
stbrowne committed Feb 26, 2012
1 parent 424ac0b commit ad97df8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Mono.Cxxi/ByReference.cs
Expand Up @@ -23,6 +23,11 @@ public ByReference(IntPtr ptr)
return byref.Value;
}

public static implicit operator IntPtr(ByReference<T> byref)
{
return byref.Pointer;
}

public IntPtr Pointer
{
get;
Expand Down

0 comments on commit ad97df8

Please sign in to comment.