namespace DemoProject; #nullable enable public class CodeForCSharpDemo { //Paste this method to the CSharpDemo class public string? FindFirstElement(IEnumerable collection, string? filterParam, Func predicate) { foreach (var element in collection) { if (predicate(element, filterParam)) return element; } return null; } }