var tCmbGetCount = Task.Factory.StartNew(() => { Task innerCmbGetCount = Task.Factory.StartNew(() => GetCount()); innerCmbGetCount.Wait(); return innerCmbGetCount; });
public long GetCount() { try { //calculate selected path file and folder count and assign to label lblFolderCount.Text = strFinalFolderCalc.ToString(); lblFileCount.Text = strFinalFileCalc.ToString(); return strFinalFolderCalc; } catch (System.Exception ex) { return 0; } }
innerCmbGetCount.Cancel();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)