如何从程序集限定名称中提取完整类型名称 [英] How to extract full type name from assembly qualified name
本文介绍了如何从程序集限定名称中提取完整类型名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
有没有人知道如何从
中提取完整类型名称(namespace.type)一个程序集限定名。谢谢。
Hi there,
Does anyone know how to extract the full type name ("namespace.type") from
an assembly qualified name. Thanks.
推荐答案
6月12日下午6:43,John Brown < no_spam@_nospam.comwrote:
On Jun 12, 6:43 pm, "John Brown" <no_spam@_nospam.comwrote:
你好,
有谁知道如何提取完整的类型名称( " namespace.type")来自
一个程序集限定名。谢谢。
Hi there,
Does anyone know how to extract the full type name ("namespace.type") from
an assembly qualified name. Thanks.
我认为System.Reflection命名空间可以帮助你解决这个问题。
I think System.Reflection namespace will help you with that problem.
我认为System.Reflection命名空间将帮助你解决这个问题。
这就是我的想法,但我找不到任何相关的课程。我以为
" AssemblyName"可能有所帮助,但无论我通过什么,它都会抛出以下内容
it:
给定的程序集名称或代码库无效。 (来自HRESULT的例外情况:
0x80131047)"
I think System.Reflection namespace will help you with that problem.
That''s what I thought but I can''t find any relevant class. I thought
"AssemblyName" might help but it throws the following no matter what I pass
it:
"The given assembly name or codebase was invalid. (Exception from HRESULT:
0x80131047)"
您能否显示用于加载程序集的代码?
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
" John Brown" < no_spam@_nospam.com写信息
新闻:ek ************** @ TK2MSFTNGP02.phx.gbl ...
Can you show the code you are using to load the assembly?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"John Brown" <no_spam@_nospam.comwrote in message
news:ek**************@TK2MSFTNGP02.phx.gbl...
>我认为System.Reflection命名空间将帮助您解决该问题。
>I think System.Reflection namespace will help you with that problem.
这就是我的想法,但我找不到任何相关的课程。我以为
" AssemblyName"可能有所帮助,但无论我通过什么,它都会抛出以下内容:
给定的程序集名称或代码库无效。 (HRESULT的例外情况:
0x80131047)"
That''s what I thought but I can''t find any relevant class. I thought
"AssemblyName" might help but it throws the following no matter what I
pass it:
"The given assembly name or codebase was invalid. (Exception from HRESULT:
0x80131047)"
这篇关于如何从程序集限定名称中提取完整类型名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文