Your txtLoadPath.BeginInvoke accepts a delegate of CopyFileDelegate type as the first parameter. You create an instance of this delegate incorrectly.
Instead of:
<br />
new CopyFileDelegate(CopyFile(srcDir,DesDir))
please write:
<br />
new CopyFileDelegate(CopyFile)
Your code should be:
private delegate void CopyFileDelegate(string srcDir,string DesDir);
public void CopyFile(string srcDir,string DesDir)
{
if (txtLoadPath.InvokeRequired == false)
{
}
else
{
txtLoadPath.BeginInvoke(new CopyFileDelegate(CopyFile), new object[] {});
}
}