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#. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of ET3D Sent: Monday, June 15, 2009 2:51 AM To: [email protected] Subject: Re: [IronPython] How do I SetVariable to None? ET3D wrote: > 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 a ArgumentNullException. -- 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 [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
