Skip to content

Instantly share code, notes, and snippets.

@konrad1977
Created June 2, 2015 12:35
Show Gist options
  • Save konrad1977/79730ac30643546c39dc to your computer and use it in GitHub Desktop.
Save konrad1977/79730ac30643546c39dc to your computer and use it in GitHub Desktop.
SameAbstrationLevel
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