C# 5.0 Programmer's Reference by Rod Stephens

C# 5.0 Programmer's Reference by Rod Stephens

Author:Rod Stephens
Language: eng
Format: epub, pdf
ISBN: 9781118847299
Published: 2014-04-14T16:00:00+00:00


Culture Comes First

The program must set the culture and user interface culture before it calls InitializeComponent because InitializeComponent is where the program sets the form and control properties.

For a list of culture codes, see msdn.microsoft.com/library/ee825488.aspx.

Summary

Visual Studio provides many ways to store application configuration and resource information. Some of the most useful of these methods include environment variables, the registry, configuration files, and resource files.

The registry and configuration files generally hold user-specific information that changes relatively often. You can use them to store information such as user preferences and form layout.

You can store less volatile resources that determine the application’s appearance in resource files. You can use embedded resource files to hold images, strings, audio, and other resources.

If you will distribute the application in multiple languages, localized resource files make displaying locale-appropriate resources easier. If necessary, you can change the data stored in configuration and resource files and redistribute them to your users without rebuilding the entire application.

Using all these techniques, you can make your application easily configurable. You can satisfy the needs of different kinds of users and customize the application without recompiling it.

This chapter explained ways that a program can save configuration and resource information using tools such as the registry, environment variables, and resource files. Generally, these kinds of data are of relatively limited size. If an application needs to store larger amounts of data, it should probably use a database or file.

The next chapter explains classes that a C# application can use to work with stream data in general and files in particular. Using streams attached to files, a program can read and write large amounts of data without cluttering up the registry, environment variables, or resource files.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.