Return empty array if length is zero (#16529)
authorkasper3 <33230602+kasper3@users.noreply.github.com>
Sat, 24 Feb 2018 20:38:21 +0000 (22:38 +0200)
committerAhson Khan <ahkha@microsoft.com>
Sat, 24 Feb 2018 20:38:21 +0000 (12:38 -0800)
commitc2481cde1d05cf0c5824e74d6de05109d8471144
tree536203f81652ae866311e9694a5b70b13d8ba263
parent9f6d34490e7bc175a3a1a47b77574cb6c8ca2d12
Return empty array if length is zero (#16529)

* Return empty array if length is zero

* Return true

* Add support for portable system

* Use portable span helper instead of Array.Empty

* Move to end

* Remove else

* Return empty array if length is 0 in MemoryMarshal
src/mscorlib/shared/System/Memory.cs
src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs