Syntax help required
Can someone help with the following:
CollectionView.Filter = m => ((Custome开发者_JAVA技巧r)m).Name.ToLower().Contains(_lastNameFilter);
Instead of looking up name, I'd to search DateAdded = _filterDate
I don't know how CollectionView.Filter
works, but why don't you just use this:
CollectionView.Filter = m => ((Customer)m).DateAdded == _filterDate;
It looks like it should be:
CollectionView.Filter = m =>
((Customer)m).DateAdded == DateTime.Parse(_filterDate);
With the assumption that _filterDate
is a string and DateAdded
a Date
CollectionView.Filter = m => ((Customer)m).DateAdded == DateTime.Parse(_filterDate);
精彩评论