Skip to content

Instantly share code, notes, and snippets.

@MarcBruins
Last active January 4, 2019 17:41
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/97c61543ffdf6a470a795307b99245ff to your computer and use it in GitHub Desktop.
Save MarcBruins/97c61543ffdf6a470a795307b99245ff to your computer and use it in GitHub Desktop.
Possible dereference of a null reference sample
public async Task<SearchCodeResult> Search(SearchCodeRequest search)
{
foreach (var repo in search.Repos)
{
//do search stuff
}
}
class SearchCodeRequest{
public IList<string>? Repos { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment