TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Narcis Parfene
NA
10
0
Closing a file opened by a process
Dec 26 2009 4:21 AM
I run and stop a process with
Process pr = Process.Start("program.exe") ;
pr.WaitForExit(500) ;
if ( ! pr.HasExited )
pr.Kill();
The problem is that "program.exe" opens a file (for example: test.txt) and with "pr.Kill(); " test.txt remains opened. How can I close this file?
Reply
Answers (
4
)
About C# language
How to make Search fast