public class Tomato
{}
public class Potato
{}
public class UIPotatoBinding(Expression<Func<object>> expression)
{
// What to put here to make sure lambda results in Potato(s)
}
public class UITomatoBinding(Expression<Func<object>> expression)
{
// What code do I need to put here to determine if the lambda expression being passed in
// results in Tomato, List<Tomato>, IEnumerable<Tomato>, ObservableCollection<Tomato>
// TomatoCollection, or some other Tomato related Linq construct.
}
这个 lambda 东西对我来说仍然很陌生。如果我问的是已经在其他地方回答过的明显问题,我深表歉意。