Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The
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, TimePeriod2
has a property called Seconds
that uses the value
parameter to assign a new string to the backing field _seconds
. 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.
For more information, see the C# Language Specification. The language specification is the definitive source for C# syntax and usage.
.NET feedback
.NET is an open source project. Select a link to provide feedback: