```val type: KClass<Any> = Int::class // i will dy...
# getting-started
r
Copy code
val type: KClass<Any> = Int::class // i will dynamically pass in a type
Why doesn't this work? How can I achieve it.
c
You mentioned in the previous messages that you're making a course for students, and want to avoid using libraries to not confuse them… are you sure reflection APIs and dynamic type casting is a good idea?
2