Suppose I have the following functions:
Public Function myF1ToStream(.. .) As System.IO.Memor yStream
. . .
Dim ms As New System.IO.Memor yStream(buf)
Return ms
End Function
Public Function mcF2ToXml(. . .) As Xml.XmlDocument
. . .
Dim xmlDoc As New Xml.XmlDocument
xmlDoc.Load(ms)
Return xmlDoc
End Function
When I call these functions, which of the following lines marked with
('?) is necessary?
(I use vs2003, without 'Using' keyword. )
Dim ms As System.IO.Memor yStream = myF1ToStream(.. .)
'? ms.Seek(0, System.IO.SeekO rigin.Begin)
. . . ms.ReadByte() . . .
'? ms.Close()
'? ms = Nothing
Dim xmlDoc As XmlDocument = mcF2ToXml(...)
. . . myUse(xmlDoc) . . .
'? xmlDoc = Nothing
Thanks,
Atara
*** Sent via Developersdex http://www.developersdex.com ***
Comment