如何比较 Int64 和 Int64
How to compare a Int64 with a Int64
我正在开发一个 Swift 程序,现在我遇到了一个问题:
如何比较 Int64 和 Int64?
if(msgCount.value != msg.longLongValue){
错误:
Binary operator '!=' cannot be applied to operands of type 'Int64' and 'Int64'
可以直接比较是否相等
试试这个,它会对你有帮助:
let msgCount : Int64=100
let msg : Int64=101
if(msgCount != msg ){
// perform your logic here.
}
我正在开发一个 Swift 程序,现在我遇到了一个问题:
如何比较 Int64 和 Int64?
if(msgCount.value != msg.longLongValue){
错误:
Binary operator '!=' cannot be applied to operands of type 'Int64' and 'Int64'
可以直接比较是否相等
试试这个,它会对你有帮助:
let msgCount : Int64=100
let msg : Int64=101
if(msgCount != msg ){
// perform your logic here.
}