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
Ajit More
NA
569
336.3k
How to kill process ?
Nov 17 2016 7:53 AM
Hi friends,
i want to close process and run every time using for loop ?
But Process run only first time and after that show error process stop , not start next process automatically
DirectoryInfo d = new DirectoryInfo(txtfolderpath.Text);
Files = d.GetFiles("*.kmz").Union(d.GetFiles("*.kml")).ToArray(); //Getting kml,kmz files
str1 = new string[Files.Length];
for (int i = 0; i < Files.Length; i++)
{
str1[i] = Files[i].Name;
// Create new stopwatch.
Stopwatch stopwatch = new Stopwatch();
// Begin timing.
stopwatch.Start();
// Start Google Earth
Process process = Process.Start(txtfolderpath.Text + "\\" + str1[i]);
int timese = Convert.ToInt16(Convert.ToInt16(txttime.Text) * 1000);
// Wait process
Thread.Sleep(timese);
// Stop timing.
stopwatch.Stop();
// Stop Google Earth
process.Kill();
}
Reply
Answers (
1
)
Do i need partial view compulsary to add devExpress Gridview
Add a project to Source Safe