The Assembly class provides the following methods for retrieving resources:
public virtual Stream GetManifestResourceStream(Type type, String name);
This method returns a managed stream for the resource data given the logical name of the resource qualified by the namespace of the type. For example, if the logical name of the resource isMyResource
and the fully qualified name of the type isMyNameSpace.Foo
, GetResource will return the resource data for the resource namedMyNameSpace.MyResource
.
public virtual Stream GetManifestResourceStream(String name);
This method returns a managed stream for the resource data given the logical name of the resource.
public Assembly GetSatelliteAssembly(CultureInfo culture);
This method returns an assembly’s satellite assembly for the given culture.
public String[] GetManifestResourceNames();
This method returns the logical resource names of the resources defined in an assembly.