Setter

noun

say it: “SET-er” /ˈsɛtər/

The set part of a property, which runs when code stores a new value and can check it first.

What is Setter in C#?

Setter — A method that validates or changes an object's stored value.

class Thermostat
{
    public int Temperature
    {
        get;
        set;
    }
}

In a sentence

  • “The setter for Price throws an error for a negative price.”

Level: Journeyman · More C# terms at this level

Updated

In other subjects