Information Technology Reference
In-Depth Information
params Parameters
If the delegate declaration's parameter list contains a params parameter, then the params key-
word is omitted from the parameter list of the anonymous method. For example, in the
following code:
The delegate type declaration specifies the last parameter as a params type parameter.
￿
The anonymous method parameter list, however, must omit the params keyword.
￿
Params keyword used in delegate type declaration
delegate void SomeDel( int X, params int[] Y);
Params keyword omitted in matching anonymous method
SomeDel mDel = delegate (int X, int[] Y)
{
...
};
Search WWH ::




Custom Search