Hi,
I am very week in design and program to interface. I have a task to design few classes. I have some simple interfaceslike below. Sample interfaces.
public interface IParameterValue { string ParameterName { get; set; } string ParameterValu { get; set; } }
the above interface is a kind of common interface.
The below interfaces should actually implement the above interface.
Area Parameter interface:
public interface IAreaParameter { string AreaId { get; set; } }
public class AreaParameter : IAreaParameter { public string AreaId { get; set; } }
Plot paramtere interface:
public interface IPlotParameter { string AreaId { get; set; } string PartId { get; set; } }
public class PlotParameter : IPlotParameter { public string AreaId { get; set; } public string PartId { get; set; } }
Now the common interface IParameterValue has ParameterName and ParameterValu. There will be one more incoming value scope. depending on the scopethe paramterValu will be applied Area wise or Plot wise.
Now, I think we have to implement IParameterValue interface to IAreaParameter and IPlotParamter.My question is, how to implement in code and if we implement how to access all this paramtersfrom other class and assign a value to them.
Simple question i think but did'n work with interfaces more so...
Thanks.