Created
June 2, 2015 12:35
-
-
Save konrad1977/79730ac30643546c39dc to your computer and use it in GitHub Desktop.
SameAbstrationLevel
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
void UpdatePersonWithId(int personId) { | |
Person personToFind = FindPersonWithId(personId); | |
if (personToFind != null) | |
SavePerson(personToFind); | |
} | |
void FindPersonWithId(int personId) { | |
Person personToFind = null; | |
foreach(person in personList) { | |
if (person.id == personId) { | |
return person; | |
} | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment