DataTable dt = ds.Tables[0];
 DataView dataView = dt.DefaultView;
 DataTable dtDistinct = dataView.ToTable(true, "GC002_UserID", "GC002_UserName","字段3","字段3","字段5");//DataTable根据 UserID去掉重复的
//ToTable中最终填写的的字段 最终会在dtDistinct的列内包含,其他没有填写的字段将不在包含

 

相关文章:

  • 2021-07-15
  • 2021-10-21
  • 2021-12-19
  • 2022-01-04
  • 2021-10-07
  • 2022-12-23
  • 2021-07-15
  • 2021-05-15
猜你喜欢
  • 2021-12-20
  • 2021-05-19
  • 2021-05-18
  • 2021-12-20
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案