<Member Name="CreateInstance(System.Type,System.Int64[])" />
<Member Name="Empty<T>" />
<Member Name="Exists<T>(T[],System.Predicate<T>)" />
+ <Member Name="Fill<T>(T[],T)" />
+ <Member Name="Fill<T>(T[],System.Int32,System.Int32,T)" />
<Member Name="Find<T>(T[],System.Predicate<T>)" />
<Member Name="FindAll<T>(T[],System.Predicate<T>)" />
<Member Name="FindIndex<T>(T[],System.Int32,System.Int32,System.Predicate<T>)" />
return Array.FindIndex(array, match) != -1;
}
+ public static void Fill<T>(T[] array, T value)
+ {
+ if (array == null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
+ }
+
+ for (int i = 0; i < array.Length; i++)
+ {
+ array[i] = value;
+ }
+ }
+
+ public static void Fill<T>(T[] array, int startIndex, int count, T value)
+ {
+ if (array == null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
+ }
+
+ if (startIndex < 0 || startIndex > array.Length)
+ {
+ ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index();
+ }
+
+ if (count < 0 || startIndex > array.Length - count)
+ {
+ ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
+ }
+
+ for (int i = startIndex, end = startIndex + count; i < end; i++)
+ {
+ array[i] = value;
+ }
+ }
+
public static T Find<T>(T[] array, Predicate<T> match) {
if( array == null) {
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);