Other than readability, what is the difference between the following linq queries and when and why would I use one over the other:
IEnumerable<T> items = listOfItems.Where(d => d is T).Cast<T>();
and
IEnumerable<T> items = listOfItems.OfType<T>();
Update:
Dang, sorry introduced some bugs when trying to simplify my problem
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…