相关疑难解决方法(0)

如何从引用程序集中的静态类获取字段及其值

我在一个名为"A7" 的refrenced程序集(名为"DAL")中有一个静态类:

A7是这样的:

public static class A7
{
public static readonly bool NeedCoding = false;
public static readonly string Title = "Desc_Title"
public static readonly string F0 = "";
public static readonly string F1 = "Desc_F1";
public static readonly string F2 = "Desc_F2";
public static readonly string F3 = "Desc_F3";
public static readonly string F4 = "Desc_F4";
}
Run Code Online (Sandbox Code Playgroud)

如何从DAL汇编A7类获取所有属性名称和值?

谢谢

c# reflection c#-4.0

20
推荐指数
3
解决办法
1万
查看次数

标签 统计

c# ×1

c#-4.0 ×1

reflection ×1