Answers for "get item from icollection"

C#
1

get item from icollection

var foo = myICollection.OfType<YourType>().FirstOrDefault();
// or use a query
var bar = (from x in myICollection.OfType<YourType>() where x.SomeProperty == someValue select x)
	.FirstOrDefault();
Posted by: Guest on November-19-2020

Code answers related to "get item from icollection"

C# Answers by Framework

Browse Popular Code Answers by Language