根据键值对列表中的现有值检查键值对
如何根据现有的 KeyValuePair 列表检查新的 KeyValuePair ?我想比较包含或排除该项目的条件。我正在使用 vb.net 3.5,
它是一个嵌套的 For 循环,我正在根据条件的结果删除数据行,
args = (existing list of KeyValuePAir)
For Each datarow As DataRow In ds.Tables(0).Rows
Dim args2 As KeyValuePair(Of Integer, Integer) = New KeyValuePair(Of Integer, Integer)(datarow.Item("Integer1"), datarow.Item("Integer2"))
我在这里要做的是查看 args2 是否已包含在 args 中,如果不是,我会删除数据行,但我还需要多次搜索数据行
How can I check a new KeyValuePair against an existing list of KeyValuePair ? I want to compare for a condition to include or exclude the item. I am using vb.net 3.5
it is a nested For loop and I am deleting a datarow on the result of the condition
args = (existing list of KeyValuePAir)
For Each datarow As DataRow In ds.Tables(0).Rows
Dim args2 As KeyValuePair(Of Integer, Integer) = New KeyValuePair(Of Integer, Integer)(datarow.Item("Integer1"), datarow.Item("Integer2"))
what I want to do here is see if args2 is already contained in args if not I would delete the datarow , but I also need to search the datarow multiple times
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试一下
我不确定你是否需要编写更好的平等检查
Try
I am not sure whether you need to write a better equality check
我能够通过检查来解决它
I was able to resolve it by checking with