Hi,
If you want to return IEnumerable, I suggest you should try to use FindAll instead of Find. And you'll need to use a delegate explicitly.
For example:
bool IsAge(MyClass^ item)
{
return item->Age == 12;
}
IEnumerable<MyClass^>^ result = list->FindAll(gcnew System::Predicate<MyClass^>(IsAge));
Could you please provide more details about the second question? What do you want to achieve?
Best Regards,
Jeanine
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.