2012-10-14 3 views
0

저는 멀티 타겟 도메인 프로젝트 (SL and .Net 4.0)를 가지고 있고 Color와 관련된 문제 때문에 #if SILVERLIGHT 구문을 사용하고 있었지만 지금은 내 도메인을 사용하는 SL 프로젝트가 필요합니다. .Net 4.0 사이트에서 구현되지 않은 INotifyDataErrorInfo를 구현하는 소수의 클래스를 프로젝트하고 나는 결코 사용하지 않을 것입니다.#IF Silverlight for interfaces

난 당신이 실버에서 부분적인 키워드를 사용할 수있는 가정이

public class MyDomainClass: INotifyPropertyChanged, #IF Silverlight INotifyDataErrorInfo 
{ 

답변

1

같은 것을 만드는 방법을 조언 gratefull 것 :

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 
} 
#ENDIF 
+0

감사 르네 당신의 대답. 그거 좋네. :) – user278618