Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Silverlight 项目,它使用数据协定将数据传递给 WCF 服务。然后,WCF 方法调用同样具有相同属性的 BAL 类。有什么办法可以避免这种属性的重复?
查克,
根据您的情况,这可能对您有用。您可以在 Visual Studio 中的项目之间共享项目。添加新项目(在您的情况下为 C# 类)时,只需将该项目添加为链接项目。通过这样做,该类将仅存在于一个位置。几个月前我写了一篇关于这个的博客文章。
我希望这有帮助!
http://www.pagebrooks.com/archive/2008/10/11/sharing-code-between-.net-and-silverlight-platforms.aspx