XPRBprobXPRBreadarrline(StreamReader, Int32, String, Double, Int32) Method |
Read a line of an array from a data file.
Namespace: BCLAssembly: xprbdn (in xprbdn.dll) Version: 47.01.01+0ba4e76731516b80760698bbaa939494dae84e49
Syntaxpublic int XPRBreadarrline(
StreamReader fileStreamIn,
int maxlen,
string format,
out double[] output,
int numData
)
Public Function XPRBreadarrline (
fileStreamIn As StreamReader,
maxlen As Integer,
format As String,
<OutAttribute> ByRef output As Double(),
numData As Integer
) As Integer
Parameters
- fileStreamIn StreamReader
- The open StreamReader to read the data from.
- maxlen Int32
- The maximum length of data to read.
- format String
- The format to read the data in. This is a string made up of the following
formats, seperated by any seperating characters. The format must be exact with
respect to spacing (if there are 0+ spaces between the entries then a space " "
must be included in the format string). See the BCL example programs for
examples of this.
- {g} – A double value.
- {i} – An integer value.
- {t} or {T} – A string value.
- {s} – A string within single quotes.
- {S} – A string within double quotes.
- output Double
- The out array, in this case if all requested objects were
doubles you could use this function, otherwise use the more
general function that outputs an object[] object.
- numData Int32
- The number of times to read the format string. For instance
if the format string was "{g} , {g} ; {g} , " and the numdata=2
then the resultant format string to be read would be
"{g} , {g} ; {g} , {g} , {g} ; {g}" as the method strips everything
after the last occurence of "}".
Return Value
Int32The integer number of items read, -1 on error.
Examplexbcoco2.cs in the Introductory Examples folder.
See Also