Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IObservable in Silverlight 4 : type or namespace IObservable could not be found

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?

like image 544
BuddyJoe Avatar asked Jan 21 '23 08:01

BuddyJoe


1 Answers

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

like image 188
Judah Gabriel Himango Avatar answered Feb 09 '23 01:02

Judah Gabriel Himango