我們可以動態地在LINQ查詢條件的位置上?如何使用條件
例如:
class Result
{
string v1;
string v2;
string v3;
}
List<Result> result = (from r in results select r);
//i want to do something like the following....
if(conditionA)
{
result = result appened (or v1 = xxx)
}
else if(conditionB)
{
result = result appened (or v2 = xxx)
}
else if(conditionC)
{
result = result appened (or v3 == xxx)
}
任何人都知道如何處理Linq中的條件????
釷
怎麼樣的關係ship..some是,有些是或 – jojo 2010-02-25 00:59:36
哦,對了,我沒有注意到.... thekaido的回答可以幫助你,然後 – 2010-02-25 01:27:25