Question

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?

Was it helpful?

Solution

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>.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top