NotifyOfPropertyChange<ObservableCollection<BaseMdmViewModelCollection>>(() => SubItemsViewModels);

最佳答案

它正在使用签名调用泛型函数

NotifyOfPropertyChange<T>(Func<BaseMdmViewModelCollection>)

() => SubItemsViewModels


等同于

delegate { return SubItemsViewModels; }


换一种说法,

NotifyOfPropertyChange<ObservableCollection<BaseMdmViewModelCollection>>(() => SubItemsViewModels);


是相同的

NotifyOfPropertyChange<ObservableCollection<BaseMdmViewModelCollection>>(Foo);


Foo会在哪里

private BaseMdmViewModelCollection Foo()
{
    return SubItemsViewModels;
}

关于c# - 解释这在C#中是什么意思?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5791403/

10-09 07:18