Example #1
0
 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));
     }
 }
Example #2
0
 public static T FindByName <T>(this Element element, string name)
 => (T)element.FindByName(name);