【发布时间】:2012-02-07 06:40:39
【问题描述】:
我有两个不同的课程:
class X
{
public int TX1 { get; set; }
public string TX2 { get; set; }
public string OX1 { get; set; }
}
class Y
{
public int TY1 { get; set; }
public string TY2 { get; set; }
public string TY3 { get; set; }
public string OY1 { get; set; }
}
例如:
OX1 => 1,2,3,4
OY1 => 2,1
现在我需要检查至少找到一个匹配的值。
使用LINQ向我建议一些解决方案。
【问题讨论】:
-
您能说明一下您希望如何匹配吗?在两个 X/Y 集合之间还是仅在两个字符串之间?最好有代码。
-
您能详细说明一下吗?您是否试图为 OX1 中存在 OY1 中的任何值的 X 类查找任何 Y 类?
-
你有什么问题?您尝试了什么,什么没有奏效?
-
我想将 X=>Ox1.split(',') 的每个值与 y=>OY1.split(',') 进行比较
-
你想标记为否定,因为你无法回答......