Partager via


Arrays.Fill Method

Definition

Overloads

Fill(Char[], Int32, Int32, Char)

Assigns the specified char value to each element of the specified range of the specified array of chars.

Fill(Double[], Int32, Int32, Double)

Assigns the specified double value to each element of the specified range of the specified array of doubles.

Fill(Int16[], Int32, Int32, Int16)

Assigns the specified short value to each element of the specified range of the specified array of shorts.

Fill(Byte[], Int32, Int32, SByte)

Assigns the specified byte value to each element of the specified range of the specified array of bytes.

Fill(Int64[], Int32, Int32, Int64)

Assigns the specified long value to each element of the specified range of the specified array of longs.

Fill(Single[], Int32, Int32, Single)

Assigns the specified float value to each element of the specified range of the specified array of floats.

Fill(Int32[], Int32, Int32, Int32)

Assigns the specified int value to each element of the specified range of the specified array of ints.

Fill(Object[], Int32, Int32, Object)

Assigns the specified Object reference to each element of the specified range of the specified array of Objects.

Fill(Boolean[], Int32, Int32, Boolean)

Assigns the specified boolean value to each element of the specified range of the specified array of booleans.

Fill(Int64[], Int64)

Assigns the specified long value to each element of the specified array of longs.

Fill(Single[], Single)

Assigns the specified float value to each element of the specified array of floats.

Fill(Int32[], Int32)

Assigns the specified int value to each element of the specified array of ints.

Fill(Int16[], Int16)

Assigns the specified short value to each element of the specified array of shorts.

Fill(Double[], Double)

Assigns the specified double value to each element of the specified array of doubles.

Fill(Char[], Char)

Assigns the specified char value to each element of the specified array of chars.

Fill(Byte[], SByte)

Assigns the specified byte value to each element of the specified array of bytes.

Fill(Boolean[], Boolean)

Assigns the specified boolean value to each element of the specified array of booleans.

Fill(Object[], Object)

Assigns the specified Object reference to each element of the specified array of Objects.

Fill(Char[], Int32, Int32, Char)

Assigns the specified char value to each element of the specified range of the specified array of chars.

[Android.Runtime.Register("fill", "([CIIC)V", "")]
public static void Fill (char[] a, int fromIndex, int toIndex, char val);
[<Android.Runtime.Register("fill", "([CIIC)V", "")>]
static member Fill : char[] * int * int * char -> unit

Parameters

a
Char[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Char

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified char value to each element of the specified range of the specified array of chars. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(char[], int, int, char).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Double[], Int32, Int32, Double)

Assigns the specified double value to each element of the specified range of the specified array of doubles.

[Android.Runtime.Register("fill", "([DIID)V", "")]
public static void Fill (double[] a, int fromIndex, int toIndex, double val);
[<Android.Runtime.Register("fill", "([DIID)V", "")>]
static member Fill : double[] * int * int * double -> unit

Parameters

a
Double[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Double

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified double value to each element of the specified range of the specified array of doubles. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(double[], int, int, double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int16[], Int32, Int32, Int16)

Assigns the specified short value to each element of the specified range of the specified array of shorts.

[Android.Runtime.Register("fill", "([SIIS)V", "")]
public static void Fill (short[] a, int fromIndex, int toIndex, short val);
[<Android.Runtime.Register("fill", "([SIIS)V", "")>]
static member Fill : int16[] * int * int * int16 -> unit

Parameters

a
Int16[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Int16

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified short value to each element of the specified range of the specified array of shorts. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(short[], int, int, short).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Byte[], Int32, Int32, SByte)

Assigns the specified byte value to each element of the specified range of the specified array of bytes.

[Android.Runtime.Register("fill", "([BIIB)V", "")]
public static void Fill (byte[] a, int fromIndex, int toIndex, sbyte val);
[<Android.Runtime.Register("fill", "([BIIB)V", "")>]
static member Fill : byte[] * int * int * sbyte -> unit

Parameters

a
Byte[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
SByte

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified byte value to each element of the specified range of the specified array of bytes. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(byte[], int, int, byte).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int64[], Int32, Int32, Int64)

Assigns the specified long value to each element of the specified range of the specified array of longs.

[Android.Runtime.Register("fill", "([JIIJ)V", "")]
public static void Fill (long[] a, int fromIndex, int toIndex, long val);
[<Android.Runtime.Register("fill", "([JIIJ)V", "")>]
static member Fill : int64[] * int * int * int64 -> unit

Parameters

a
Int64[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Int64

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified long value to each element of the specified range of the specified array of longs. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(long[], int, int, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Single[], Int32, Int32, Single)

Assigns the specified float value to each element of the specified range of the specified array of floats.

[Android.Runtime.Register("fill", "([FIIF)V", "")]
public static void Fill (float[] a, int fromIndex, int toIndex, float val);
[<Android.Runtime.Register("fill", "([FIIF)V", "")>]
static member Fill : single[] * int * int * single -> unit

Parameters

a
Single[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Single

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified float value to each element of the specified range of the specified array of floats. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(float[], int, int, float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int32[], Int32, Int32, Int32)

Assigns the specified int value to each element of the specified range of the specified array of ints.

[Android.Runtime.Register("fill", "([IIII)V", "")]
public static void Fill (int[] a, int fromIndex, int toIndex, int val);
[<Android.Runtime.Register("fill", "([IIII)V", "")>]
static member Fill : int[] * int * int * int -> unit

Parameters

a
Int32[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Int32

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified int value to each element of the specified range of the specified array of ints. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(int[], int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Object[], Int32, Int32, Object)

Assigns the specified Object reference to each element of the specified range of the specified array of Objects.

[Android.Runtime.Register("fill", "([Ljava/lang/Object;IILjava/lang/Object;)V", "")]
public static void Fill (Java.Lang.Object[] a, int fromIndex, int toIndex, Java.Lang.Object? val);
[<Android.Runtime.Register("fill", "([Ljava/lang/Object;IILjava/lang/Object;)V", "")>]
static member Fill : Java.Lang.Object[] * int * int * Java.Lang.Object -> unit

Parameters

a
Object[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Object

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified Object reference to each element of the specified range of the specified array of Objects. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(java.lang.Object[], int, int, java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Boolean[], Int32, Int32, Boolean)

Assigns the specified boolean value to each element of the specified range of the specified array of booleans.

[Android.Runtime.Register("fill", "([ZIIZ)V", "")]
public static void Fill (bool[] a, int fromIndex, int toIndex, bool val);
[<Android.Runtime.Register("fill", "([ZIIZ)V", "")>]
static member Fill : bool[] * int * int * bool -> unit

Parameters

a
Boolean[]

the array to be filled

fromIndex
Int32

the index of the first element (inclusive) to be filled with the specified value

toIndex
Int32

the index of the last element (exclusive) to be filled with the specified value

val
Boolean

the value to be stored in all elements of the array

Attributes

Exceptions

if start > end.

if start or end > array.length.

Remarks

Assigns the specified boolean value to each element of the specified range of the specified array of booleans. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Java documentation for java.util.Arrays.fill(boolean[], int, int, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int64[], Int64)

Assigns the specified long value to each element of the specified array of longs.

[Android.Runtime.Register("fill", "([JJ)V", "")]
public static void Fill (long[] a, long val);
[<Android.Runtime.Register("fill", "([JJ)V", "")>]
static member Fill : int64[] * int64 -> unit

Parameters

a
Int64[]

the array to be filled

val
Int64

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified long value to each element of the specified array of longs.

Java documentation for java.util.Arrays.fill(long[], long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Single[], Single)

Assigns the specified float value to each element of the specified array of floats.

[Android.Runtime.Register("fill", "([FF)V", "")]
public static void Fill (float[] a, float val);
[<Android.Runtime.Register("fill", "([FF)V", "")>]
static member Fill : single[] * single -> unit

Parameters

a
Single[]

the array to be filled

val
Single

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified float value to each element of the specified array of floats.

Java documentation for java.util.Arrays.fill(float[], float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int32[], Int32)

Assigns the specified int value to each element of the specified array of ints.

[Android.Runtime.Register("fill", "([II)V", "")]
public static void Fill (int[] a, int val);
[<Android.Runtime.Register("fill", "([II)V", "")>]
static member Fill : int[] * int -> unit

Parameters

a
Int32[]

the array to be filled

val
Int32

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified int value to each element of the specified array of ints.

Java documentation for java.util.Arrays.fill(int[], int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Int16[], Int16)

Assigns the specified short value to each element of the specified array of shorts.

[Android.Runtime.Register("fill", "([SS)V", "")]
public static void Fill (short[] a, short val);
[<Android.Runtime.Register("fill", "([SS)V", "")>]
static member Fill : int16[] * int16 -> unit

Parameters

a
Int16[]

the array to be filled

val
Int16

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified short value to each element of the specified array of shorts.

Java documentation for java.util.Arrays.fill(short[], short).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Double[], Double)

Assigns the specified double value to each element of the specified array of doubles.

[Android.Runtime.Register("fill", "([DD)V", "")]
public static void Fill (double[] a, double val);
[<Android.Runtime.Register("fill", "([DD)V", "")>]
static member Fill : double[] * double -> unit

Parameters

a
Double[]

the array to be filled

val
Double

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified double value to each element of the specified array of doubles.

Java documentation for java.util.Arrays.fill(double[], double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Char[], Char)

Assigns the specified char value to each element of the specified array of chars.

[Android.Runtime.Register("fill", "([CC)V", "")]
public static void Fill (char[] a, char val);
[<Android.Runtime.Register("fill", "([CC)V", "")>]
static member Fill : char[] * char -> unit

Parameters

a
Char[]

the array to be filled

val
Char

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified char value to each element of the specified array of chars.

Java documentation for java.util.Arrays.fill(char[], char).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Byte[], SByte)

Assigns the specified byte value to each element of the specified array of bytes.

[Android.Runtime.Register("fill", "([BB)V", "")]
public static void Fill (byte[] a, sbyte val);
[<Android.Runtime.Register("fill", "([BB)V", "")>]
static member Fill : byte[] * sbyte -> unit

Parameters

a
Byte[]

the array to be filled

val
SByte

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified byte value to each element of the specified array of bytes.

Java documentation for java.util.Arrays.fill(byte[], byte).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Boolean[], Boolean)

Assigns the specified boolean value to each element of the specified array of booleans.

[Android.Runtime.Register("fill", "([ZZ)V", "")]
public static void Fill (bool[] a, bool val);
[<Android.Runtime.Register("fill", "([ZZ)V", "")>]
static member Fill : bool[] * bool -> unit

Parameters

a
Boolean[]

the array to be filled

val
Boolean

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified boolean value to each element of the specified array of booleans.

Java documentation for java.util.Arrays.fill(boolean[], boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Fill(Object[], Object)

Assigns the specified Object reference to each element of the specified array of Objects.

[Android.Runtime.Register("fill", "([Ljava/lang/Object;Ljava/lang/Object;)V", "")]
public static void Fill (Java.Lang.Object[] a, Java.Lang.Object? val);
[<Android.Runtime.Register("fill", "([Ljava/lang/Object;Ljava/lang/Object;)V", "")>]
static member Fill : Java.Lang.Object[] * Java.Lang.Object -> unit

Parameters

a
Object[]

the array to be filled

val
Object

the value to be stored in all elements of the array

Attributes

Remarks

Assigns the specified Object reference to each element of the specified array of Objects.

Java documentation for java.util.Arrays.fill(java.lang.Object[], java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to