Converting values between same structure within different namespace. C#

前端 未结 7 1440
情书的邮戳
情书的邮戳 2021-01-13 17:28

I have two similar[all attributes are same.] structures within different namespaces.

Now when i try to copy values between the objects of these structures i am getti

7条回答
  •  心在旅途
    2021-01-13 17:49

    as all attributes are same, you can e.g. define an interface, describe your structure and implement this interface in your structures. Then cast your structures to the interface to copy values.

    regards, O

提交回复
热议问题