By ExcelAsyncUtil.Run ,parameters can set null??

Jan 8, 2013 at 8:10 AM

hi,

One question

define method like this:

 public static object DownloadAsyncFail(string url)       

{           

   return ExcelAsyncUtil.Run( "DownloadAsyncFail", null,delegate { return Download(url); }); 

 }

The 'parameters' is null,But DownloadAsyncFail ReCalculate.

Does this mean that I always set null,it will no problem??

 

 

 

Coordinator
Jan 8, 2013 at 8:00 PM

Hi,

The second parameter to ExcelAsyncUtil.Run is used to distinguish different calls, and should reflect the parameter(s) of the function. In this case you'd call it as:

return ExcelAsyncUtil.Run( "DownloadAsyncFail", url, delegate { return Download(url); }); 

The parameter can be a single value, like url here, or an object array containing multiple values.

If the enclosing function takes no parameters, you can safely pass null.

-Govert