C# 可观察 collection
C# observable collection
有谁知道我可以检索观察结果的第一个元素吗collection?
我已经将元素添加到我的 collection:
_fetchingWords.Add(new Words { English = "abc", French = "dcb", Spanish = "mez"});
我需要检索第一个元素,即 abc。
你可以使用linq,
var firstElement = _fetchingWords.First();
ObservableCollection 有一个 index
就这么简单
我看英文是属性
_fetchingWords[_fetchingWords.Count - 1].English;
有谁知道我可以检索观察结果的第一个元素吗collection?
我已经将元素添加到我的 collection:
_fetchingWords.Add(new Words { English = "abc", French = "dcb", Spanish = "mez"});
我需要检索第一个元素,即 abc。
你可以使用linq,
var firstElement = _fetchingWords.First();
ObservableCollection 有一个 index
就这么简单
我看英文是属性
_fetchingWords[_fetchingWords.Count - 1].English;