You are developing a Windows Forms application that displays real-time stock market data. Which data binding technique would you choose to ensure the UI is automatically updated as data changes?

  • Data binding with INotifyPropertyChanged interface
  • Data binding with DataSource property
  • Data binding with DataTable
  • Data binding with DataAdapter
Data binding with the INotifyPropertyChanged interface would be suitable for this scenario. This interface allows objects to notify clients of changes to their properties. By implementing INotifyPropertyChanged on your data model classes, you can ensure that any changes to the underlying data will automatically trigger updates in the UI, providing real-time updates to the stock market data being displayed. Using the other options may require manual handling of data updates, which can be less efficient and prone to errors.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *