[IronPython] Implementing an interface with ref parameters
dinov at exchange.microsoft.com
Fri Aug 17 14:46:06 PDT 2007
I believe what we should be doing is passing you a Reference<T> object where T in this case is bool. The Reference<T> object has a Value property which you can set and when you return the ref parameter should get updated.
Let me know if that doesn't work for you.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata
Sent: Friday, August 17, 2007 5:09 AM
To: users at lists.ironpython.com
Subject: [IronPython] Implementing an interface with ref parameters
I'm trying to implement a C# interface with methods that contains ref parameter, eg:
public interface IContent
void BeginProcess(ref bool captureContent);
void EndProcess(string content);
A straight implementation will not work because IronPython does not modify the captureContent value
captureContent = False # This doesn't work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users