[Ironruby-core] Casting Objects (COM Interop) addendum
orion.edwards at gmail.com
Thu Mar 26 18:22:26 EDT 2009
As a follow up to my last message, I wrote a small util method, as follows:
public static class Util
public static T Cast<T>(object o)
And then try to call it from ruby:
x = Util.method(:cast).of(ICanDoStuff).call(mycomobject)
However, the Util.method(:cast).of(ICanDoStuff) fails with this error:
`ToType': invalid value for Class: ProxyLi
from :0:in `of'
Util.method(:cast).of(String) works fine however - is this because I'm
trying to pass in a .NET interface (which lives in an auto-generated interop
dll built by tlbimp) rather than a class?
Any help is much appreciated
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core