想要创建运行时类和集合作为给定的例子?我们该怎么办? [英] want to create run time class and collection as given example? how we can do?
本文介绍了想要创建运行时类和集合作为给定的例子?我们该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想创建一个应该是运行时的类,下面就像我要提到的那样。
I want to create a class which should be runtime, below example like what i am tring to do.
我有客户类
公共类客户{
公共字符串名称; //这个字段想要动态创建
Public string Name;// this field want to create dynamically
公共字符串地址;
}
然后想要使用
列表<客户> obj = new List< Customer>();
List<Customer> obj = new List<Customer>();
obj.Add(new Customer(){Name1 =" aa",Addrss =" as"});
obj.Add(new Customer(){Name1="aa", Addrss="as"});
Ashok
推荐答案
Hi Ashok,
Hi Ashok,
检查以下文章。
http:/ /www.codeproject.com/Articles/37254/Creating-classes-at-runtime
关心
Sophia
这篇关于想要创建运行时类和集合作为给定的例子?我们该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文