SyntaxFix
Write A Post
Hire A Developer
Questions
Using function Find is cleaner way.
MyClass item = MyList.Find(item => item.name == "foo"); if (item != null) // check item isn't null { .... }