Created
November 6, 2020 00:59
-
-
Save felipebaltazar/a63897c4b667505e858f2538ca71441e 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
public static IsNullOrEmpty<T>(this IEnumerable<T> collection) | |
{ | |
if(collection is null) | |
return; | |
return !collection.Any(); | |
} | |
//usar assim collecao.IsNullOrEmpty() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment