如何将ObservableCollection属性结果转换为ObservableCollection类型

问题描述 投票:0回答:1

我具有以下只读属性

public ObservableCollection<Author> Authors { get; } = new ObservableCollection<Author>();

我需要在get语句中设置以下linq表达式。我不知道该怎么做。任何建议或指导将不胜感激!

 var result = (from author in Authors where author.Name.StartsWith(this.filterText) select author).ToList<Author>();
c# observablecollection
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.