The value
implicit parameter
The implicit parameter value
is used in the set
accessor in property and indexer declarations. It's an input parameter of a method. The word value
references the value that client code is attempting to assign to the property or indexer. In the following example, MyDerivedClass
has a property called Name
that uses the value
parameter to assign a new string to the backing field name
. From the point of view of client code, the operation is written as a simple assignment.
class TimePeriod2
{
private double _seconds;
public double Seconds
{
get => _seconds;
set => _seconds = value;
}
}
For more information, see the Properties and Indexers articles.
C# language specification
For more information, see the C# Language Specification. The language specification is the definitive source for C# syntax and usage.