[Ironruby-core] Enumerate CLR methods

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Jan 8 10:52:51 EST 2009

Module#methods doesn’t return .NET members right now. It should. Filed a bug #23493.


From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Wednesday, January 07, 2009 11:35 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Enumerate CLR methods

instance.class.to_clr_type.get_methods.collect { |m| m.name.to_s }.uniq.sort.each { |m| p m }

or Form.to_clr_type.get_methods.collect { |m| m.name.to_s }.uniq.sort.each { |m| p m }
On Thu, Jan 8, 2009 at 1:36 AM, Alex 2k8 <lists at ruby-forum.com<mailto:lists at ruby-forum.com>> wrote:

How to enumerate the CLR object methods?

I whould like to write some thing like this:

 - - -
 require 'System.Windows.Forms, Version=, Culture=neutral,
 include System::Windows::Forms
 p Form.new.methods.sort
 - - -

and to see methods like: show, show_dialog, ...

- Alex
Posted via http://www.ruby-forum.com/.
Ironruby-core mailing list
Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090108/9a680510/attachment.html>

More information about the Ironruby-core mailing list