Data Access, Properties, and Methods
- slide 27 : 29
Parameter Arrays
A parameter array is a formal parameter of array type which can absorb zero, one or more actual parameters
Parameter array passing
Elements of a parameter array are passed by value
A parameter array must be the last parameter in the formal parameter list
The formal parameter must be a single dimensional array
Arguments that follow ordinary value, ref and out parameters are put into a newly allocated array object
Arguments are implicitly converted to the element type of the array
The class A with a DoAdd method - both out and params.
Output of class A with DoAdd - both out and params.
An integer sequence - use of params in constructor.
Our earlier encounter of integer sequences