是否有任何选项做这样的事情:列表添加一个裁判字符串对象
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Student
{
public string PassPort { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Message { get; set; }
public List<string> AllProperties { get; set; }
public Student()
{
AllProperties = new List<string>();
AllProperties.Add(ref PassPort);
AllProperties.Add(ref FirstName);
AllProperties.Add(ref LastName);
AllProperties.Add(ref Message);
}
}
所以当我改变AllProperties[0]
它会改变PassPort
字符串变量?
你想AllProperties [ 0]调用属性“PassProt”?如果是的话,你应该反思 – ZivS 2014-12-06 09:20:23
我使用DataTable来显示信息,我想这样做索引我得到 – 2014-12-06 09:39:20
我在做execl数据表和我需要字符串作为属性 但消息属性是可选的,所以我想确保只有相关的属性是fullfill和不输入null属性 – 2014-12-06 09:41:54