Observable collections

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 1 year, 2 months ago.

  • Author
  • #38661
    Profile photo of David Zemdegs
    David Zemdegs

    I just came across this line of code:
    New-Object 'System.Collections.ObjectModel.ObservableCollection[System.Object]'

    When I search I get loads of examples but I couldn't find a basic description.
    Why would I use an observable collection over a normal collection?
    It appears to be aligned with windows forms but does it have uses other than with forms?

  • #38664
    Profile photo of Don Jones
    Don Jones

    They fire events when the collection is modified, so you can write code to respond to that. Thus, the collection is "observable."

You must be logged in to reply to this topic.