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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dody Gunawinata
Sent: Friday, August 17, 2007 5:09 AM
To: [email protected]
Subject: [IronPython] Implementing an interface with ref parameters

Hi all,

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

class ImageGallery(IContent):
    def BeginProcess(captureContent):
        captureContent = False # This doesn't work.



--
nomadlife.org<http://nomadlife.org>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to