using System.Resources; ResourceManager resourceManager = new ResourceManager(typeof(Resources)); UnmanagedMemoryStream stream = resourceManager.GetStream("myResource");
using System.Resources; ResourceSet resourceSet = new ResourceSet(typeof(Resources).Assembly.GetManifestResourceStream("Resources.resources")); foreach (DictionaryEntry entry in resourceSet) { UnmanagedMemoryStream stream = entry.Value as UnmanagedMemoryStream; if (stream != null) { // Do something with the stream } }In this example, we retrieve a ResourceSet and iterate through its contents to get any UnmanagedMemoryStream objects. Package library: System.Resources.ResourceManager is a part of the .NET Framework Class Library.