Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
namespace Unity.Helper
{
public static class ArrayHelper
{
public static T[] Empty<T>()
{
return EmptyArray<T>.Instance;
}
private static class EmptyArray<T>
{
public static T[] Instance { get; private set; }
static EmptyArray()
{
Instance = new T[0];
}
}
}
}
Owner

yKimisaki commented Feb 3, 2016

Instead of Array.Empty().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment