Assembly.GetManifestResourceNames Метод
Определение
Возвращает имена всех ресурсов в этой сборке.Returns the names of all the resources in this assembly.
public:
virtual cli::array <System::String ^> ^ GetManifestResourceNames();
public virtual string[] GetManifestResourceNames ();
abstract member GetManifestResourceNames : unit -> string[]
override this.GetManifestResourceNames : unit -> string[]
Public Overridable Function GetManifestResourceNames () As String()
Возвращаемое значение
- String[]
Массив, который содержит имена всех ресурсов.An array that contains the names of all the resources.
Реализации
Комментарии
Каждое имя ресурса в массиве, возвращаемом этим методом, можно использовать следующим образом:You can use each resource name in the array returned by this method as follows:
Имя ресурса можно передать в GetManifestResourceInfo метод, чтобы получить дополнительные сведения о ресурсе.You can pass the resource name to the GetManifestResourceInfo method to get additional information about the resource.
Если имя определяет двоичный RESOURCES-файл, можно удалить его расширение Resources и передать его ResourceManager.ResourceManager(String, Assembly) конструктору для создания экземпляра Resource Manager.If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the ResourceManager.ResourceManager(String, Assembly) constructor to instantiate the resource manager.
Можно передать имя ресурса в GetManifestResourceStream метод, чтобы получить Stream объект, который затем можно передать в ResourceReader.ResourceReader(Stream) конструктор.You can pass the resource name to the GetManifestResourceStream method to retrieve a Stream object that you can then pass to the ResourceReader.ResourceReader(Stream) constructor.
Можно передать имя ресурса в GetManifestResourceStream метод, чтобы получить Stream объект, который затем можно передать в ResourceSet.ResourceSet(Stream) конструктор.You can pass the resource name to the GetManifestResourceStream method to retrieve a Stream object that you can then pass to the ResourceSet.ResourceSet(Stream) constructor.
Сведения о ресурсах возвращаются только в том случае, если ресурс является видимым для вызывающего объекта или у вызывающего объекта ReflectionPermission .Resource information is returned only if the resource is visible to the caller, or the caller has ReflectionPermission.