vendredi 6 septembre 2019

Can you cast an object to a class dynamically?

I would like to cast an object based on one of it's fields, the field would have the right value for the object.

for example

object as object.class

object.class would be equivalent to a class, like Int or any other kotlin class.

is it possible?





Aucun commentaire:

Enregistrer un commentaire