-
-
Save defunkt/151000 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
person = Person.new | |
person.name | |
person.name = name | |
person.setFirstName(first, lastName:last) |
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
Person *person = [Person new]; // create an instance of the Person class. | |
[person name]; // send selector 'name'. | |
[person setName:name]; // send selector 'setName:', passing the 'name' variable as an argument. | |
[person setFirstName:first lastName:last]; // send selector 'setFirstName:lastName:', | |
// passing both 'first' and 'last' variables as arguments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment