📅  最后修改于: 2022-03-11 14:49:20.079000             🧑  作者: Mango
var foo = myICollection.OfType().FirstOrDefault();
// or use a query
var bar = (from x in myICollection.OfType() where x.SomeProperty == someValue select x)
.FirstOrDefault();