I have a List<FieldsInfo> in two different namespace say A & B both of them are in different project within same VS solution. I have populated some values for List<FieldsInfo> in namespace B. I want to pass this list to List<FieldsInfo> in namespace B to assign value to ListBox control. Please suggest me how can I achieve this.
I have a List<FieldsInfo> in two different namespace say A & B both of
Share
There is nothing related between
A.FieldsInfoandB.FieldsInfo. The ideal would be to make them only a single type. If that isn’t possible, then a lazy compromise is to declare anIFieldsInfosomewhere (with the common members), and implementIFieldsInfofrom both types. One nice thing about this is that implicit interface implementation will kick in, andpartialclasses make it possible to do this even for generated types outside your control:Now just talk in terms if
IFieldsInfoinstead of eitherA.FieldsInfoorB.FieldsInfo.