In C# you can put a constraint on a generic method like:
public class A {
public static void <T> Method (T a) where T : new() {
//...do something...
}
}
Is there also a way to put a constraint like "there exists a constructor with a float[,] parameter?" The following code doesn't compile well:
public class A {
public static void <T> Method (T a) where T : new(float[,] u) {
//...do something...
}
}
Or is there a work-around for it