https://kotlinlang.org logo
#android
Title
# android
v

Vivek Modi

07/18/2022, 12:08 PM
Hey guys can somone tell me what is the use of
private set
in here ?
Copy code
var number : Int by mutableStateOf(0)
        private set
k

Kunal Pasricha

07/18/2022, 12:16 PM
I hope this blog will help you to understand the use of
private set
- https://agrawalsuneet.medium.com/property-getter-and-setter-kotlin-d89a3e70e62
v

Vivek Modi

07/18/2022, 12:17 PM
oh that's great thank you so much... 😊
😀 1
h

hisham bin awiad

07/19/2022, 1:14 PM
it’s just for prevent assign to
number
any new value !!
v

Vivek Modi

07/19/2022, 1:19 PM
Thankyou
3 Views