Hi
I've recently started learning Windows Forms and I've encountered a problem. I have a form (lets call it a mainForm) In this mainForm some data is loaded and displayed to user in ListView control. I want this data to be available in other forms. I wrote a static class and added some static fields.....and it works....but is it a good way of solving such problem? Are there any better solutions or patterns?

Thanks for any help

Properties and events are the recommended way of making forms talk to each other. How to do that depends on how the main form loads other forms, but in Edward's experience, passing shared data through the form constructor is usually good enough.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.