[Python.NET] .NET 4.0 Extension methods

Liam Corrigan Liam.Corrigan at allenvanguard.com
Wed Oct 10 20:21:07 CEST 2012


Hi,
I'm using my own python .NET 4.0 build and I'm trying to access some extension methods for a concurrent queue.
However, the console only shows methods and not extension methods.  In visual studio 2010 C# .NET 4.0, I can see all the extension methods in the Intellisense/Autocomplete options.

More specifically, I'm doing this following.

import clr4
import System
from System import *
from System.Collections.Generic import *
from System.Collections.Concurrent import *

q1 = System.Collections.Concurrent.ConcurrentQueue[System.Double]()

# Attempting to get this extension method's return value.
# in CSharp I would just call this extension method to get the last item's value
# without dequeueing it.

val = q1.Last()

# but the python console tells me the object has no attribute 'Last'

Is this a known limitation, or is it something specific in how they must be called?


This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20121010/94813741/attachment.html>


More information about the PythonDotNet mailing list