ResourceManager.GetStream Method (String)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns an UnmanagedMemoryStream object from the specified resource.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- name
- Type: System.String
The name of a resource.
| Exception | Condition |
|---|---|
| InvalidOperationException | The value of the specified resource is not a MemoryStream object. |
| ArgumentNullException | name is Nothing. |
| MissingManifestResourceException | No usable set of resources is found, and there are no neutral resources. |
The GetStream method takes the name of a resource that is stored as a MemoryStream object, gets the value of the Object resource, and returns an UnmanagedMemoryStream object. This method is useful primarily for performance reasons: retrieving a resource as an UnmanagedMemoryStream object instead of an explicit object can improve performance.