我们可以使用System.Reflection从.dll中提取结构的名称吗? 请提供一些链接。
struct MyStruct // <-- this name i wanna to find from .dll using Reflection
{
private int length;
private int breadth;
public int Area(int length,int breadth)
{
return length*breadth;
}
}
答案 0 :(得分:4)
您可以通过调用Assembly.GetTypes()
方法从程序集( .dll )中获取所有类型的列表。可以从Type.Name
属性访问每种类型的名称。
答案 1 :(得分:2)