Hi as a new programmer I might be violating stuff here but I have the following situation:
I have this Wafercontext architecture:
public interface IWaferContext
{
string IN_MEDIA_TYPE { get; set; }
string MEDIA_ID { get; set; }
}
public class RMTWaferContext : IWaferContext
{
public string CONTAINER_RESULT { get; set; }
public string IN_MEDIA_TYPE { get; set; }
public string MEDIA_ID { get; set; }
}
public class CIMWaferContext : IWaferContext
{
public string IN_MEDIA_TYPE { get; set; }
public string MEDIA_ID { get; set; }
publc string AB_DATA {get; set;}
}
I then have these interface and classes which uses it in composition:
public interface IBaseWaferContainer
{
IWaferContext WaferContext { get; set; }
}
public interface IWaferContainer : IBaseWaferContainer
{
//might need to add additional things
}
public class CIMWaferContainer : IWaferContainer
{
public CIMWaferContext WaferContext { get; set; } = new CIMWaferContext();
public List<CIMWaferDieMeasurements> WaferMeasurementList { get; set; } = new List<CIMWaferDieMeasurements>();
}
But i get an error in the CIMWaferContainer so the code doesn't compile:
'CIMWaferContainer' does not implement interface member 'IBaseWaferContainer.WaferContext'. 'CIMWaferContainer.WaferContext' cannot implement 'IBaseWaferContainer.WaferContext' because it does not have the matching return type of 'IWaferContext'. TDXXMLParser
I thought it would be able to work since CIMWaferContainer inherits from IWaferContainer which is child interface to IBaseWaferContainer? Anyway to make this work?