类的结构
public class EmployeeDetails
{
public int Id { get; set; }
public string Name { get; set; }
public string Exp { get; set; }
}
员工详情列表
Id Name Exp
-- --------- --------
1 Bill 2 years
2 John 5 years
3 Doug 1 years
我想要从列表对象中删除一个字段,比如Id
,就像下面的输出结果一样。
Name Exp
--------- --------
Bill 2 years
John 5 years
Doug 1 years
有人有想法怎么做吗?
和我分享一下
谢谢
List<EmployeeDetails>= new List<EmployeeDetails>
- Pradip Talaviya