I need to take the function from user and I only know that the return type is bool and that any number of params is T type. But I don't know how many params
Oh right I can have the .At() method in the builder 🤦♂️ I was still thinking about the method extensions and just didn't know how to return the generic Type in there.
You basically meant something like this, right?
public static PositionableControl<T> PlacedIn<T>(this T control, Canvas canvas) where T : Control { }
public class PositionableControl<T> where T : Control {
public T At(int x, int y) { }
}
public static PositionableControl<T> PlacedIn<T>(this T control, Canvas canvas) where T : Control { }
public class PositionableControl<T> where T : Control {