Does anyone know can i retrieve the first element of an observation collection?
I have already added elements to my collection:
_fetchingWords.Add(new Words { English = "abc", French = "dcb", Spanish = "mez"});
I need to retrieve the first element ,ie , abc .
您可以使用 linq,
var firstElement = _fetchingWords.First();
ObservableCollection has an index
It is as simple as
I take it English is a property
_fetchingWords[_fetchingWords.Count - 1].English;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.