C# Linq判断这个字段是否包含(信用卡)三个字
//判断字段是否包含“信用卡”三个字 //System.Linq.Enumerable.WhereEnumerableIterator<char> IEnumerable<char> linqChar = from UserBankCard in responseBankCard.Result.CardNature where responseBankCard.Result.CardNature.Contains("信用卡") select UserBankCard; var charList = linqChar.ToList(); string payType; if (charList.Count > 0) { //支付类型 payType = BankPayPayType.Lingfeng_CreditCard_QuickPay.ToString();//信用卡 } else { payType = BankPayPayType.Lingfeng_DebitCard_QuickPay.ToString();//借记卡 }