我正在研究Swift程序,现在我遇到了一个问题:
如何将Int64与Int64进行比较?
if(msgCount.value != msg.longLongValue){
错误:
Binary operator '!=' cannot be applied to operands of type 'Int64' and 'Int64'
答案 0 :(得分:3)
您可以直接比较相等
试试这个,它会对你有所帮助:
let msgCount : Int64=100
let msg : Int64=101
if(msgCount != msg ){
// perform your logic here.
}