Skip to content

Instantly share code, notes, and snippets.

@MarcBruins
Last active December 16, 2018 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcBruins/06535a6d76d3253a0cb4a41bf9eced9f to your computer and use it in GitHub Desktop.
Save MarcBruins/06535a6d76d3253a0cb4a41bf9eced9f to your computer and use it in GitHub Desktop.
Returning null
public static IReadOnlyCollection<string> FirstPopulatedList(List<string> list1, List<string> list2)
{
if (HasElements(list1))
return list1;
if (HasElements(list2))
return list2;
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment