Dear all, I would like to have a kind of template class like the following:
class Example {
this(Type_left x, Type_right y) {
this.left = x;
this.right = y;
}
Type_left left;
Type_right right;
}
Such that at runtime I can instantiate it with different types:
new Example(int a, int b);
new Example(int a, string b);
I have read about templates and abstract classes, but I have not
figured how to get this to work. Thanks.
