Created
July 22, 2022 21:13
-
-
Save MasoudFallahpour/bcf98170e6d175be3bed2ba35552725f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User { | |
var firstName: String by Delegate() | |
var lastName: String by Delegate() | |
} | |
fun main() { | |
val user = User().apply { | |
firstName = "John" | |
lastName = "Doe" | |
} | |
val firstName = user.firstName | |
val lastName = user.lastName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment