我有一个多目标域项目(SL和SILVERLIGHT 4.0)和颜色等问题,我正在使用#if .Net构造,但现在我需要有一个SL项目使用我的域项目实现INotifyDataErrorInfo的几个类,这不是在.Net 4.0网站上实现的,我永远不会使用它。
我将非常感谢您的建议,如何制作这样的东西
public class MyDomainClass: INotifyPropertyChanged, #IF Silverlight INotifyDataErrorInfo
{发布于 2012-10-15 03:24:46
假设您可以在silverlight中使用partial关键字:
public partial class MyDomainClass: INotifyPropertyChanged
{
// implement everything on INotifyPropertChanged
}
#IF Silverlight
public partial class MyDomainClass:INotifyDataErrorInfo
{
// implement everything on INotifyDataErrorInfo
// if needed using the stuff from the 'shared' class
}
#ENDIFhttps://stackoverflow.com/questions/12885518
复制相似问题