M
Michael Moreno
hello,
I am trying to write a generic class where the underlying type is
either an int, a float or a double:
public class CMatrix<T>: ICloneable where VarType: int, float, double
but that does not compile.
The error message is :
'int' is not a valid constraint. A type used as a constraint must be an
interface, a non-sealed class or a type parameter.
Is it possible to do what I want?
thanks.
I am trying to write a generic class where the underlying type is
either an int, a float or a double:
public class CMatrix<T>: ICloneable where VarType: int, float, double
but that does not compile.
The error message is :
'int' is not a valid constraint. A type used as a constraint must be an
interface, a non-sealed class or a type parameter.
Is it possible to do what I want?
thanks.