← Docs
kotlin-stdlib / kotlin / ULong / toLong

toLong

Common
JVM
JS
Native
1.0
fun toLong ( ) : Long
(source)

Converts this ULong value to Long .

If this value is less than or equals to Long.MAX_VALUE , the resulting Long value represents the same numerical value as this ULong . Otherwise the result is negative.

The resulting Long value has the same binary representation as this ULong value.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .