Bonsoir amis développer,

est-ce que une âme charitable pourrait me traduire en bon français ce que fait ce code.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
    public event PropertyChangedEventHandler PropertyChanged;
 
    private void NotifyPropertyChanged(String info)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(info));
        }
    }
 
    // The constructor is private to enforce the factory pattern.
    private DemoCustomer()
    {
        customerNameValue = "Customer";
        phoneNumberValue = "(555)555-5555";
    }
 
 
    // This property represents an ID, suitable
    // for use as a primary key in a database.
     public string CustomerName
    {
        get
        {
            return this.customerNameValue;
        }
 
        set
        {
            if (value != this.customerNameValue)
            {
                this.customerNameValue = value;
                NotifyPropertyChanged("CustomerName");
            }
        }
    }
C'est surtout ce qui est dans le set de la propriété CustomerName que je ne comprend pas vraiment.
Pourquoi quelque fois on met le NotifyPropertyChanged("propriété") et d'autre fois non ?

Merci d'avance.
Klivor