Added T[].Add()
parent
c9385cb467
commit
39214388c8
8
Array.cs
8
Array.cs
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
namespace sharp.extensions
|
||||
{
|
||||
public static class ArrayExtension
|
||||
|
@ -111,5 +112,12 @@ namespace sharp.extensions
|
|||
return -1;
|
||||
}
|
||||
|
||||
public static T[] Add<T>(this T[] a,T e)
|
||||
{
|
||||
T[] r = a.Extend<T>(a.Length + 1);
|
||||
r[a.Length] = e;
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue