函数调用在linq中的let语句中不起作用

时间:2017-09-07 06:38:10

标签: c# linq

    double Percentage = 80;
    var MatchingTransactions = (from RowT in dtTransactionsList.AsEnumerable()
                                from RowN in dtNameList.AsEnumerable()
    let cust_match_percentage = ReturnSimilarityPercentage() //returns double
    let rec_match_percentage = ReturnSimilarityPercentage() //returns double
    where (cust_match_percentage >= Percentage || rec_match_percentage >= Percentage)
    select new{
    trn_id = Convert.ToInt64(RowT["trn_id"]),
    matching_name = "",
    matching_percentage = (cust_match_percentage > rec_match_percentage) ? cust_match_percentage : rec_match_percentage}).Distinct();
    public double ReturnSimilarityPercentage(){return 86.345;}

函数ReturnSimilarityPercentage()未执行。

0 个答案:

没有答案