我的课
class person
{
public string name;
public string age;
public string height;
public string weight;
}
这就是我想做的...
person john = new person();
int i=0;
List<string> myList = new List<string>() { "John", "22", "174cms" ,"60kgs"};
foreach(property in john)
{
property = myList[i].toString();
i++;
}
我该怎么做呢?或者我真的可以这样做吗?