Mais je ne comprends pas l'exemple en C#, et l'exemple en python (ci-dessous) ne marche pas.
>>>importclr>>>clr.AddReference(r"C:\Debug\ListInConstr")<System.Reflection.RuntimeAssemblyobjectat0x02849E50>>>>fromListInConstrimportListInConstr>>>ListInConstr.__overloads__ListInConstr.ListInContr(Boolean,System.Collections.Generic.List`1[System.String])>>>fromSystem.Collections.GenericimportList>>>fromSystemimportString>>>arg2=List[String]()#do not add elements here>>>ListInConstr(True,arg2)<ListInConstr.ListInConstrobjectat0x0284E890>>>>
Je n'ai pas de C:\Debug\ListInConstr , et une recherche sur ListInConst ne donne rien.
Vous savez comment convertir une liste Python vide en .NET ?
# Créer une liste en .NET depuis Python ?
Posté par Darckense (site web personnel) . En réponse au message Ou trouver de l'aide pour une question Python / Matlab/ .NET ?. Évalué à 2.
Bon, suite à ma question sur Stack Overflow, il semblerait que je doive convertir l'argument de liste Python en C#.
Il y a un exemple : http://stackoverflow.com/questions/40403221/how-to-use-python-and-net-c-to-automatise-princeton-instruments-lightfield
Mais je ne comprends pas l'exemple en C#, et l'exemple en python (ci-dessous) ne marche pas.
Je n'ai pas de C:\Debug\ListInConstr , et une recherche sur ListInConst ne donne rien.
Vous savez comment convertir une liste Python vide en .NET ?
Merci...
--
Darckense