How can I define a constructor in an open generic type?
- by Cort
I am trying to create on open generic type that has a constructor to be used by derived types, but I either don't know how to do it or it is not possible -- not sure which.
public struct DataType<T> : IDataType {
private T myValue;
private TypeState myState;
private DataType<T>(T initialValue, TypeState state) {
myValue = initialValue;
myState = state;
}
}
Any help much appreciated!
Cort