↑ Table of Contents ↑ | §9.2 Using classes with value parameters >> |
§9.1 Defining classes with value parameters
(a) Value parameter declaration
Within the angle brackets that mark the parameters of a generic class also value parameters can be declared. In contrast to a type parameter, a value parameter is denoted as a pair of two identifiers: a type and a free name, e.g.,
class MyClass<YourType aName> { ...
Note that value parameters are valid for classes only, not for interfaces.
↑ Table of Contents ↑ | §9.2 Using classes with value parameters >> |