SHARE
TWEET

Untitled

a guest Sep 20th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct Greeting {
  2.     var tempName = "도란"
  3.     var name: String {
  4.         get {
  5.             return tempName+" "+"안녕하세요"
  6.         }
  7.         set(newValue) {
  8.             tempName = newValue+"님"
  9.         }
  10.     }
  11. }
  12.  
  13. var greeting = Greeting()
  14. greeting.name // "도란"
  15. greeting.name = "도미닉"
  16. greeting.name // "도미닉"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top