var resourceManager = new ResourceManager("MyResources", typeof(MyClass).Assembly); // use resources... // release all resources resourceManager.ReleaseAllResources();
using (var resourceManager = new ResourceManager("MyResources", typeof(MyClass).Assembly)) { // use resources }Here, the using statement is used to create a block in which resources are used. When the block is exited, the resource manager is automatically disposed of and all resources are released. Package Library: The System.Resources.ResourceManager class is part of the .NET Framework Class Library.