[IronPython] Using StreamReader.Read(char[], Int32, Int32)

Paparipote . paparipote at hotmail.com
Sat Feb 11 08:28:07 PST 2006


Hello:
I need your guidelines please, I am a little (or very??) confused with the 
next:
.
.
.
r = StreamReader(file,System.Text.Encoding.Default)
c=[] ??
r.Read(c,0,3)
Traceback (most recent call last):
  File , line 0, in input##43
  File mscorlib, line unknown, in Read
ValueError: Offset and length were out of bounds for the array or count is 
greaer than the number of elements from index to the end of the source 
collection.

if I write:
c=[[],[],[]]
r.Read(c,0,3)
Traceback (most recent call last):
  File , line 0, in input##48
TypeError: bad args to this method <method# Read on System.IO.StreamReader>

Well ... the question is: how can I define an array of chars so I can avoid 
this message?

Thanks.

_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/



More information about the users mailing list