私の人のクラス:
 class Person
{
    public string FirstName { get; private set; }
    public string LastName { get; private set; }
    public int Age { get; private set; }
    public Person(string firstName,string LastName,int age)
    {
        this.FirstName = firstName;
        this.LastName = LastName;
        this.Age = age;
    }
    public override string ToString()
    {
        return this.FirstName + " " + this.LastName + " " + this.Age;
    }
}
主要:
 class Program
{
    static void Main(string[] args)
    {
        Person sallyPerson = new Person("Sally", "Solomon",23);
    }
}
その人の名前と年齢を変更したいとしましょう。どうすれば変更できますか? FirstName および Age プロパティは非公開で設定されます。