Application configuration settings - Do I make global?

C

codebreaker

I am new to OOP so please excuse this basic question!

I am writing a C# application for Windows Mobile (.net compact framework).
The application is basically a data-logger with a Bluetooth connection.
Besides the basic logging screen there are a number of auxiliary
configuration screens (forms) to set up things like the user name,
tolerances, operator language, Com Port number etc.... These settings will
need to be stored to file (or registry) when the application closes and read
when the application first runs.

Should these 'configuration settings' all be stored in a single 'object' and
the object passed to each form as a parameter, or should I make the members
of the configuration object 'global' by using the Static modifier so all
forms have access to the members?
 
J

Jialiang Ge [MSFT]

Good morning Paul

First of all, sorry for the big delay of our response. The delay is caused
by an issue in the MSDN managed newsgroup system, and we are working with
relevant teams to fix it. In future, if you see the delay again, please
directly send an email to (e-mail address removed). We will take action in no
time.

For this thread about application configuration settings in .NET CF, though
NET CF is not in managed newsgroup support list, I'm glad to share some
ideas for your reference: Since the Configuration related classes are not
available in NetCF, developers can use registry to store application
settings. Regarding the design of the settings class, if only one copy of
setting is required during the lifetime of the application, you can
consider making it singleton or just static (take future
upgrade/inheritance and performance considerations).

The appropriate newsgroup for .NET CF questions is:
microsoft.public.dotnet.framework.compactframework

The managed newsgroup support list is:
http://msdn.microsoft.com/en-us/subscriptions/aa974230.aspx

Our apology for the delayed response again.

Thanks,
Jialiang Ge
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top