定义类:

public class Student

{

    public string Name{get;set;}

}

 

定义List集合数据:

List<Student> stuList = new List<Student>();

stuList .add(new Student(){Name="a1"});

stuList .add(new Student(){Name="a2"});

 

定义接收的List<string> 字符串集合:

List<string> vList = new List<string>();

vList =stuList.Select(t => t.Name).ToArray();

相关文章:

  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2022-02-12
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案