Created
May 19, 2020 09:26
-
-
Save MichalBrylka/288196a20bcafddf29ed933145c7388a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Do not replace the array allocation with Array.Empty. We don't want to have the overhead of | |
// instantiating another generic type in addition to ArraySegment<T> for new type parameters. | |
public static ArraySegment<T> Empty { get; } = new ArraySegment<T>(new T[0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment