Project1.dll文件中定义了类Class_A08R
namespace Project1
{
[Serializable]
public class Class_A08R
{
public string dEvent;
public string bill_no;
}
}
另一项目引用 Project1.dll
public Project1.Class_A08R Class_A08R_obj = new Project1.Class_A08R();
Type t = Class_A08R_obj.GetType();
ProperInfo[] properties_A08R = t.GetProperties();
对象数组properties_A08R始终是0维,没数据
Assembly theAssembly = Assembly.LoadFile(path1); //path1:Project1绝对路径
Type t = theAssembly.GetType("Project1.Class_A08R");
ProperInfo[] properties_A08R = t.GetProperties();
properties_A08R始终是0维而把自定义的类换成Dataset类,Type类 测试,是能返回多维的.怎么回事
ProperInfo[] properties_test = Type.GetType("System.type").GetProperties();
namespace Project1
{
[Serializable]
public class Class_A08R
{
public string dEvent;
public string bill_no;
}
}
另一项目引用 Project1.dll
public Project1.Class_A08R Class_A08R_obj = new Project1.Class_A08R();
Type t = Class_A08R_obj.GetType();
ProperInfo[] properties_A08R = t.GetProperties();
对象数组properties_A08R始终是0维,没数据
Assembly theAssembly = Assembly.LoadFile(path1); //path1:Project1绝对路径
Type t = theAssembly.GetType("Project1.Class_A08R");
ProperInfo[] properties_A08R = t.GetProperties();
properties_A08R始终是0维而把自定义的类换成Dataset类,Type类 测试,是能返回多维的.怎么回事
ProperInfo[] properties_test = Type.GetType("System.type").GetProperties();
解决方案 »
- 求大神 类型System.String的对象无法转换成类型System.Object[]。。
- 关于引用窗体的问题!急求解!
- c# web应用程序中 下拉列表项为化学分子式
- 求Asp.net中页面跳转的代码
- c# sortedlist 排序
- 提个简单的问题?
- 来来来!猜一下。还要过多久我们才不用下.netframework也能运用行C#做的程序?C++什么时候才会退出去?没空就来JF
- C# 调用 c++dll 参数为结构体 求大神指教
- 求救,C# 调用C编写的dll问题
- 如何获得并保存图像中的某块区域(ToImageOrBitmap)??
- C#获取远程文件大小及修改日期
- oledb连接sql server2000出错?急!!!!!!!!!
你定义的是变量,对应的是FieldInfo
{
get
{}
set
{}
}
这才是属性
这种东西叫 Field , 你应该用 GetFields 来返回.这样才是Property:
pubilc string bill_no{
get{return null;}
}