开发者

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜