how to dispoes the xmlDocument object

Dec 4 2010 7:26 AM
i am creating the xml documet with the xmlDocumet class object and i save it in the local folder  and send that to the mail add as attachment after sending the mail i am delete that file but at the deletion it throws the error that is

that is used by another process you can't access but the xmlDocument object have not any dispose or finalize method then how to dispose that xmlDocument Object

Answers (2)

0
Koteswararao Mallisetti

Koteswararao Mallisetti

  • 0
  • 817
  • 565.5k
Dec 6 2010 3:52 AM
after sending the mail only i want to delete that file
0
Zoran Horvat

Zoran Horvat

  • 0
  • 4.5k
  • 747.4k
Dec 4 2010 5:53 PM
How exactly do you send the file? I suppose that file is locked until email is sent, so some kind of waiting can be employed until lock is released. Please provide some more details on the way you're sending the email.