You can only make a datamember of the interface, making it weakly typed as object:
public interface IComputeVariable
{
object Data { get; }
}
(Note that this must be a property - you cannot specify fields in interfaces.)
, , ComputeScalar<T>, , .
SomeClass :
class SomeClass<T> where T : struct
{
List<IComputeVariable<T>> variables;
}
, , , .