In this chapter, you learned how to create custom resource managers. Simple resource managers require only a relatively small effort, but as the complexity increases and the need to create writeable resource managers arises, a greater depth of ResourceManager internals is required. Unfortunately, as good as these facilities are in the .NET Framework, only ASP.NET 2.0 has a concept of a resource manager provider. Windows Forms applications are unable to easily make use of custom resource managers. The code generated by Visual Studio for Windows Forms needs care and attention; there is no provider class for resource managers as there is for ADO.NET classes, and WinRes is closed beyond help. In addition, the Strongly TypedResourceBuilder class and resgen utility need additional work to make them viable for non-resx resources. With a little effort and trickery, we can overcome these limitations and give applications better functionality. Finally, we looked at ASP.NET 2.0's resource provider model, how it works, and how to create a custom resource provider. |