I have written a App that uses a simple form to collect some data from the user. What is the easiest way of making this data availbel to all the classes outside the form?
Thanks
Daniel
The simplest was I can think of (although you have to be careful) is to create a static class with static public variables. Set those variables from the form data, and everything else can access it. You don't have data persistence, and you have to be careful about other classes updating it, but it will expose the values to all other classes in the program.
You could persist the form input to a database and then access through the repository pattern, for example.