c# - Python sees property as function -


i have library written in c# , goes this

class foocollection     {         private readonly foobase _innerfoo;         public foocollection()         {             _innerfoo = new foobase();         }          public string this[int index]         {             { return _innerfoo._components[index].componentname; }             set             {                 _innerfoo._components[index].componentname = value;             }         }     } 

and class com visible , i'm trying use python. so, command works

foo(1) 

but 1 doesn't

foo(1) = 'somename' 

it gives me "can't assign call function". tried square brackets [], no good. there way bypass this, except me making additional 'normal' method in c# set property?

i'm using pywin32-218 com in python.

foo = win32com.client.dispatch("foo") 

indexed property translates il,

foocollection.get_item , foocollection.set_item, probabbly in final com object translated too.

try use these function calls.

hope helps.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -