Suppose I have this model:

```
public sealed class Model : ModelBase // base is a INotifyPropertyChanged implementation
{        
    private void SomeAction()
    {
        Console.WriteLine("SomeAction!");
    }

    protected override void OnPropertyChanged(string propertyName)
    {
        base.OnPropertyChanged(propertyName);

        switch (propertyName)
        {
            case "A":
                B = A + 1;
                SomeAction();
                break;
            case "B":
                SomeAction();
                break;
        }
    }

    public int A
    {
        get { return a; }
        set
        {
            if (a != value)
            {
                a = value;
                OnPropertyChanged("A");
            }
        }
    }
    private int a;

    public int B
    {
        get { return b; }
        set
        {
            if (b != value)
            {
                b = value;
                OnPropertyChanged("B");
            }
        }
    }
    private int b;      
}

```

Here is two properties: `A` and `B`. `B` depends from `A` - when value of `A` changes, `B` must be changed too. Anyway, when any of these properties are changed, `SomeAction` should be executed.

Obviously, I want to avoid two calls of `SomeAction` when `A` is changed.  

Is there any elegant way to do this (some kind of boolean flag isn't an elegant way)?

**UPD**.

May be, I should mention, that I'm looking for more generic solution, than ones provided in the answers below. The reason is that when the number of properties grows, the code complexity grows more faster. E.g., these graph - `D` <- `C` <- `A` -> `B` - will cause the code, that won't be easy maintainable.