public Material GetMaterial(Predicate <Material> match) { Material[] materials = Materials.FindAll(match).ToArray(); if (materials.Length == 1) { return(materials[0]); } else { Console.WriteLine("Error: {0} materials match that identifier", materials.Length); } return(null); }