[IronPython] Array element access of C# extension.

HEMMI, Shigeru textdirected at gmail.com
Thu Apr 27 19:09:54 PDT 2006


Dear Haibo Luo,

Thank you very much, I was able to do what I wanted.
(Your reply was surprisingly quick!!)

>>> import sys
>>> sys.path.append(r'C:\testing')
>>> import clr
>>> clr.AddReferenceToFile('fooLib.dll')
>>> import System
>>> x = System.Array.CreateInstance(float, 10)
>>> y = System.Array.CreateInstance(float, 10)
>>> from fooLib import *
>>> foo.goo(10,x,y)
>>> x
System.Double[](0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)
>>> y
System.Double[](1.#INF, 1.0, 0.5, 0.333333333333, 0.25, 0.2, 0.166666666667, 0.1
42857142857, 0.125, 0.111111111111)
>>>


More information about the users mailing list