system.reactive - The type arguments cannot be inferred from the query RX -


consider in test sl app (trying learn rx):

var input = (from _ in observable.fromeventpattern(txt, "textchanged")                      select txt.text)             .throttle(timespan.fromseconds(.05)).distinctuntilchanged();          var svc = new dictservicesoapclient();          var res = term in input                   words in svc.matchindictasync("wn", term, "prefix")                   select words; 

the "from" in "from words in svc...." shows error message: "the type arguments cannot inferred query. try..."

i don't trying say. how resolve this?

the compiler not know type of observable 'fromeventpattern' return since method uses reflection event. need out telling type of object returned event:

observable.fromeventpattern<textchangedeventargs>(txt, "textchanged") 

Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -