Progress bar for long running task in C#
问题 My application runs some database queries that can take a long time. While executing these queries, my application appears to freeze and it looks like the application has stopeed working. I need to use progressbar to avoid this problem but I am not sure how can predict the time that the query will take to execute. The code runing the query is below private void CheckSsMissingDate() { while (DateTime.Parse(time) <= DateTime.Now) { var ssCon = OpenSQLConnection(); var cmd = new SqlCommand(