相同的ID不同的名称,使用linq的不同ID

编程入门 行业动态 更新时间:2024-10-25 19:32:47
本文介绍了相同的ID不同的名称,使用linq的不同ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

same id different name distinct Id using in LINQ Forexample 1 vijay komal raja chennai kumar mayavaram suba trichy

推荐答案

var distinctperson = from person in people.Distinct(p => p.name)

您正在寻找类似这样的东西 collection.Distinct(person => person.ID) 或类似.我认为您应该提供有关集合类型和基础类属性的更多信息. You are looking for something like this collection.Distinct(person => person.ID) or similar. I think you should provid more information as to the type of collection and the properties of the underlying class.

更多推荐

相同的ID不同的名称,使用linq的不同ID

本文发布于:2023-10-30 18:57:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1543716.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:名称   ID   linq

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!