public static T FindByName <T>(this Element element, string name) { try { return((T)element.FindByName(name)); } catch (InvalidCastException ice) when(ResourceLoader.ExceptionHandler2 != null) { ResourceLoader.ExceptionHandler2((ice, null)); return(default(T)); } }
public static T FindByName <T>(this Element element, string name) => (T)element.FindByName(name);