Search code examples
pythonvb.netreadonly-collection

.Item property of readOnlycollection doesn't work


Im making a project in Python, using CPython3.4. I imported a dll which contains a ReadOnlyCollection. How can I get one item(at index) out of that list? I already tried to use .Item(index) and .Items but it says that:

"the object has no attribute "Item"

But when I use .Count it does give me the count. And the documentation says I could use both on this object. https://msdn.microsoft.com/en-us/library/ms132474(v=vs.110).aspx The dll is written in VB.net.

Can someone help me get one item out of that ReadOnlyCollection?


Solution

  • Is this possible?

    for i in ReadOnlyCollection:
        i.doSomething()
    

    If it is possible you can find your object in this loop