void m_Worker_DoWork(object sender, DoWorkEventArgs e) { // If the user clicks cancel the line // m_AsyncWorker.CancelAsync(); if ran above. This sets the //CancellationPending to true. //You must check this flag in here and react to it. We react to it by setting //e.Cancel to true and leaving textParseFile.takePath(); } this is short lines of my code....! it's showing error, there is no argument given correspods to required formal parameter 'sender' of textParseFile.takePath(obj, DOWorkEvents)