G
Guest
I have a function that calls a function
FileStream findata
openCloseTextFileStream(xmldataPath,out findata,true,4,out errorMes); // get a loaded FileStream to use for ReadXM
if (errorMes.Length<1
ds.ReadXml(findata);
findata.Close()
What I do in openCloseTextFileStream is open exclusively the file and and attempt to write the bytes back into the return stream then close the actual fileStream/file - but
I must provide an initial value in the function for my 'out' value, mystream
But if I do this ( within the openCloseTextFileStream function ) : mystream = null; // so I can complil
Then I get Object reference not set to an instance of an object when I attempt to fill it with Data
What is a good way to do this ? Thanks Andrew
FileStream findata
openCloseTextFileStream(xmldataPath,out findata,true,4,out errorMes); // get a loaded FileStream to use for ReadXM
if (errorMes.Length<1
ds.ReadXml(findata);
findata.Close()
What I do in openCloseTextFileStream is open exclusively the file and and attempt to write the bytes back into the return stream then close the actual fileStream/file - but
I must provide an initial value in the function for my 'out' value, mystream
But if I do this ( within the openCloseTextFileStream function ) : mystream = null; // so I can complil
Then I get Object reference not set to an instance of an object when I attempt to fill it with Data
What is a good way to do this ? Thanks Andrew