public void SelectDistinct1()
        {
            var builder = new ArrayBuilder<int> { 1, 2, 3, 2, 4, 5, 1 };
            AssertEx.Equal(new[] { 1, 2, 3, 4, 5 }, builder.SelectDistinct(n => n));

            builder = new ArrayBuilder<int> { 1 };
            AssertEx.Equal(new[] { 1 }, builder.SelectDistinct(n => n));

            builder = new ArrayBuilder<int>();
            AssertEx.Equal(new int[0], builder.SelectDistinct(n => n));

            builder = new ArrayBuilder<int> { 1, 2, 3, 2, 4, 5, 1 };
            AssertEx.Equal(new[] { 10 }, builder.SelectDistinct(n => 10));

            builder = new ArrayBuilder<int> { 1, 2, 3, 2, 4, 5, 1 };
            AssertEx.Equal(new byte[] { 1, 2, 3, 4, 5 }, builder.SelectDistinct(n => (byte)n));
        }