开发者

Minumum value of a list isn't compariable with a double value

if (b.B开发者_开发知识库ooksList[ID].BookPrices.Min== b.BooksList[ID].BookPrices[i])

cannot be compared. BookPrices[] is a list of doubles.

Error: Error 11 Operator '==' cannot be applied to operands of type 'method group' and 'double'


You forgot the parenthesis on your call to Min().

Whenever the words "method group" appear in an error message, it's time to go looking for missing parenthesis on a function call.


Try

if (b.BooksList[ID].BookPrices.Min()== b.BooksList[ID].BookPrices[i])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜