Is there any way to declare a property using a del...
# announcements
p
Is there any way to declare a property using a delegate but with a private setter?
I'm currently doing the following:
Copy code
private var _myProp by delegate()
val myProp get() = _myProp
b
Copy code
var myProp by delegate
  private set
This makes var a val from public scope
p
Ah - the newline is required - I did try that but without the newline. Thanks
b
You can do it inline as
var myProp by delegate; private set
p
perfect, thanks