[IronPython] How do I SetVariable to None?
dinov at microsoft.com
Mon Jun 15 18:08:02 CEST 2009
You probably need to actually cast null to (object). I suspect you could be getting the ObjectHandle overload which is used for remoting purposes.
I'm a little surprised C# doesn't report this as ambiguous but then again IronPython doesn't either and selects the ObjectHandle overload just like C#.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of ET3D
Sent: Monday, June 15, 2009 2:51 AM
To: users at lists.ironpython.com
Subject: Re: [IronPython] How do I SetVariable to None?
> I'm using ScriptScope.SetVariable to set variables in C# for calling
> IronPython scripts. However, I can't find how to set a variable to None.
You should just be able to set it to null from C#.
Should have mentioned I tried this (scope.SetVariable("f", null);). It gives
View this message in context: http://www.nabble.com/How-do-I-SetVariable-to-None--tp24018839p24031784.html
Sent from the IronPython mailing list archive at Nabble.com.
Users mailing list
Users at lists.ironpython.com
More information about the Ironpython-users