public static void ValDesc(this ITestable ele, string choice) { if (choice == "ext def") { Console.WriteLine($"Base.Ext.Ext.GetDesc: {ele.GetDesc()}"); } else if (choice == "ext base" && ele is BaseTest b) { Console.WriteLine($"Base.Ext.Base.GetDesc: {b.BaseFunc()}"); } }
public static string ExtFunc(this ITestable ele) { return(ele.GetDesc()); }