[IronPython] Crash with Action and reflection question

Curt Hagenlocher curt at hagenlocher.org
Thu Apr 30 15:19:24 CEST 2009

On Thu, Apr 30, 2009 at 6:09 AM, Michael Foord
<fuzzyman at voidspace.org.uk> wrote:
> The following seems to crash the IronPython 2.0.1 interpreter:
>>>> from System import Action
>>>> Action(lambda: foo)
> Obviously it's invalid - but it kills the interpreter rather than raising an
> exception.

It's been fixed for 2.6
If it's a fix that you want for the 2.0 branch, feel free to open
another item on Codeplex :).

> Another way would be to get the MethodInfo. For an arbitrary .NET type from
> inside IronPython how do I get a System.Type instance representing the type?

You mean like this?
from System.Collections.Generic import List
runtimeType = clr.GetClrType(List)

Curt Hagenlocher
curt at hagenlocher.org

More information about the Ironpython-users mailing list