Up to this point, you have been placing literal strings within your source code. However, once you start thinking of deploying your application and possibly translating these strings into different languages, hard-coding strings like this will require more work in the long run.
To alleviate this, your application can use data that comes directly from a resource file. However, this resource file isn't just limited to strings. Resource files can contain any number of different types of data that your application may need, such as image files, icons, cursors, version information, and so on.
In this hour, we are going to look at a new type of resource format used by the .NET framework: the managed resource. If you wish to use the older resource script files that were used by the older versions of Visual Studio, Microsoft has not changed any of that functionality, and you are free to do so. Using managed resources carries with it the advantage of sharing resources across assembly boundaries.
In this hour you will learn:
How to use the ResEditor application to create .NET resource files
How to incorporate the resource file into your project
How to access resources at runtime
Top |