Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the ToObservable extension method?

I see it mentioned here, but I can't work out which using I have to add to get it.

(Rolled my own for the moment)

like image 389
Benjol Avatar asked Nov 13 '09 07:11

Benjol


People also ask

What is an extension method?

Last Updated : 01 May, 2019 In C#, the extension method concept allows you to add new methods in the existing class or in the structure without modifying the source code of the original type and you do not require any kind of special permission from the original type and there is no need to re-compile the original type. It is introduced in C# 3.0.

What is extension method TM?

Subscribe Now Watch EXTENSION METHOD TM Where Fitness Meets Art Designed by dancers, created for all. The Extension Method™ is an innovative program of physical conditioning and rehabilitative techniques based on the fundamentals of classical ballet.

How to override an extension method in a sealed class?

When an extension method is defined with the same name and the signature of the existing method, then the compiler will print the existing method, not the extension method. Or in other words, the extension method does not support method overriding. You can also add new methods in the sealed class also using an extension method concept.

Why extension method does not support method overriding?

When an extension method is defined with the same name and the signature of the existing method, then the compiler will print the existing method, not the extension method. Or in other words, the extension method does not support method overriding.


2 Answers

It is in:

using System.Reactive.Linq;
like image 143
diesel Avatar answered Oct 07 '22 23:10

diesel


You need to add reference to System.Reactive.dll. Then in code write:

using System.Linq;

UPDATE: Now Rx is available as separate extensions. There are 3 versions of Rx: Rx for .NET 3.5 Sp1, Rx for Silverlight 3 and Rx for .NET 4 Beta 2. All 3 versions can be downloaded from the Devlabs Rx project page.

like image 37
QrystaL Avatar answered Oct 08 '22 00:10

QrystaL