Why/How should I use Publish without Connect?
问题 Why/how should I use .Publish() without a Connect or RefCount call following? What does it do? Example code: var source = new Subject<int>(); var pairs = source.Publish(_source => _source .Skip(1) .Zip(_source, (newer, older) => (older, newer)) ); pairs.Subscribe(p => Console.WriteLine(p)); source.OnNext(1); source.OnNext(2); source.OnNext(3); source.OnNext(4); How is pairs different from pairs2 here: var pairs2 = source .Skip(1) .Zip(source, (newer, older) => (older, newer)); 回答1: The