[IronPython] How to get System.Single[]?

Jonathan Jacobs korpse-ironpython at kaydash.za.net
Thu Jun 22 12:27:52 CEST 2006

Kevin Bjorke wrote:
> I need to create a list of Singles to use
> System.Drawing.Darwing2D.ColorBlend's Position member. Color me
> ignorant, but how can I create such a thing? I can't just pass a list of
> floats

It would be convenient to pass a tuple of floats, too bad this doesn't work. 
You can use System.Array.CreateInstance to create a Single[]:

 >>> System.Array.CreateInstance(System.Single, 3)
System.Single[](0.0, 0.0, 0.0)

Hope this helps.

More information about the Ironpython-users mailing list