file stream xmlreader and threads

  • Thread starter Thread starter Chuck Hecht
  • Start date Start date
C

Chuck Hecht

When I create a file stream say

xmlpath = "\my documents\sbcdefs.xml"
Dim fs_xml_sbcdefs As New FileStream(xmlpath, FileMode.Open)
and pass it to a XMLreader like

Dim xr_xml_sbcdefs As New XmlTextReader(fs_xml_sbcdefs)

I then pass the Xmlreader to the readxml method of a dataset like

dsTraker.ReadXml(xr_xml_sbcdefs)

I then set the filestream and the xmlreader to nothing like

fs_xml_sbcdefs = Nothing

xr_xml_sbcdefs = Nothing

QUESTION

Does setting the filestream and xmlreader to nothing implictlity close the
thread that they are using?
 
when I open the filestream or the xmlreader are they are not on the same
thread as the application?
 
They are not using any threads except for main thread of your application.

You should close FileStream though.


--
Best regards,


Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Back
Top