Questions tagged «kotlin-extension»

8
如何在Kotlin中检查“ instanceof”类?
在kotlin类中,我将方法参数作为类类型T的对象(请参见此处的kotlin doc )。作为对象,我在调用方法时传递不同的类。在Java中,我们可以使用对象来比较类。instanceof 所以我想在运行时检查并比较它是哪个类? 如何instanceof在Kotlin中上课?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.