[Ironruby-core] Getting the .NET type of an IronRuby class

Michael Letterle
2008-02-09T19:09:28Z

resources = System::ComponentModel::ComponentResoruceManager.new( X.GetType)

or if you''d rather:

require ''mscorlib''

def typeof(object)
    System::Type.GetTypeFromHandle(System::Type.GetTypeHandle(object))
end


On Feb 9, 2008 1:42 PM, Dermot Hogan <lists at ruby-forum.com>
wrote:
> Is there a simple way of getting the .NET type of an IronRuby class?
>
> I have this code:
>
> resources >
System::ComponentModel::ComponentResourceManager.new(X.class)
>
> where X is a class. But this doesn''t do it - I get a run time
exception.
>
>
> Any ideas?
>
> Dermot
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



--
Michael Letterle
[Polymath Programmer]