using System.Collections.Generic;
public static void Main()
List<string> liste = new List<string>(){
"alex", "JP", "toto","Fred"
var toto = liste.FirstOrDefault(x => Test(x)) ?? string.Empty;
.DefaultIfEmpty(string.Empty)
public static bool Test(string texte){
Console.WriteLine(texte);