Create a IObservableList from a list of IObservable
问题 I'm looking for a reactive object that implement IObservable<IReadOnlyList<T>> and IList<IObservable<T>> . That's it, I would like to be able to write : var list = new MyReactiveList<int>(); var item = new new Subject<int>(); list.Subscribe(values => Console.WriteLine($"[{string.Join(", ", values)}]")); list.Add(item); item.OnNext(1); // Will print out [1] 回答1: First up, your code that you posted in your question doesn't compile. I have fixed it the best I can: var list = new MyReactiveList