[IronPython] typeof equivalent?

Greg Chapman glc at well.com
Mon Aug 8 00:31:31 CEST 2005


If I wanted to write something like this:

    from System import DateTime

    runtimeType = typeof(DateTime)

    for propinfo in runtimeType.GetProperties():
        print propinfo.Name

(prints "Date", "Day", etc.)

Is there something in IronPython that could play the role of typeof in
the above (that is, that would give me the RuntimeType corresponding to
the python representation of a CLR type)?  If not, I think it would be
useful to add this capability in some form.

---
Greg Chapman




More information about the Ironpython-users mailing list