开发者

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

开发者 https://www.devze.com 2022-12-25 13:48 出处:网络
if (b.B开发者_开发知识库ooksList[ID].BookPrices.Min== b.BooksList[ID].BookPrices[i]) cannot be compared. BookPrices[] is a list of doubles.
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

精彩评论

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

关注公众号