문제

Where can I find this class? I have included the Rx extensions. I have made sure the version I'm compiling to is Silverlight 4. My VS2010 IDE still has no idea what the type IObservable is.

I get a compile error saying "type or namespace IObservable could not be found"

I didn't see them in the System.Collections.Generic namespace like this thread suggests http://dotnet.uservoice.com/forums/4325-silverlight-feature-suggestions/suggestions/523437-include-iobserver-t-and-iobservable-t-interface

Am I missing a reference to a dll?

도움이 되었습니까?

해결책

It's in the System namespace, the type is IObservable<T>. You'll need to add a reference to System.Observable.dll from the ReactiveExtensions SDK.

Also, while not strictly required, you'll probably want to add a reference to System.Reactive.dll, which contains numerous extension methods to operate on IObservable<T>.

다른 팁

Not a very long answers, but there's not a lot to say.

Silverlight only uses a small subset of the .NET Framework. That said, IObservable isn't included in Silverlight 4 if you don't include (reference) the System.Reactive.dll

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top