[IronPython] Q: How to resize an System.Array ?

Bernd Viehmann bernd.viehmann at ascom-ac.de
Fri Jan 12 12:47:02 CET 2007


Hi,

 I have some problems with using >System.Array<-instances in ipy.

I have found a way to create them, but not how to use the :-). Basically 
i want 2 use a MemoryStream in the following way  ( kind of C#-way :-) ) :

        dataHeap = System.Array[System.Byte]
        dataHeap.Resize(dataHeap,4096)
        bytesRead = reader.Read(dataHeap, 0, PiceLength)

But ipy does not understand me. I receive the message:

        dataHeap.Resize(dataHeap,4096)
TypeError: no callable targets, if this is a generic method make sure 
specify the type parameters

Any ideas who to use the mem-stream?

Thanks much.

 Bernd











More information about the Ironpython-users mailing list