如:
enum Msg
{
    OK,
    NO
}   class Item
{
    string Key{get;set;}
    int Len{get;set;}
    Msg msg{get;set;}
  }NameValueCollection list;  list.Add("Key","No.1");
list.Add("Len","132");
list.Add("msg","OK");
//动态的创建Item类
Item item = Activator.CreateInstance<item>(); Type obj = typeof(item); PropertyInfo[] propertys = obj.GetProperties();//将list中的数据赋值到item中
 foreach (PropertyInfo item in propertys)
 {
             //这里怎么写???  item.PropertyType 转换成相应的类型
      
 }