I have the following code working code that I derived from a Pluralsight video from Mark Seeman. I do not understand how the last line works.
let sharpObjectCollection = ConcurrentBag<Envelope<SharpObject>>()
let sharpObjectSubject = new Subjects.Subject<Envelope<SharpObject>>()
sharpObjectSubject.Subscribe sharpObjectCollection.Add |> ignore
Looking through the documentation for Subscribe, I see that it takes an IObserver as an argument, but I am passing it the ConcurrentBag.Add method.
What is going on here? Is this a feature of F#? Can I do this in c# too?