asp.net.ph

Array.SetValue Method ( Object, Int32 [ ] )

System Namespace   Array Class


Sets a value to the element at the specified position in the multidimensional Array.

[ VB ]
<Serializable>
Overloads Public Sub SetValue ( _
   ByVal value As Object, _
   ByVal indices ( ) As Integer _
)

[ C# ]
[Serializable]
public void SetValue (
   object value,
   int [ ] indices
);

[ C++ ]
[Serializable]
public: void SetValue (
   Object* value,
   int indices __gc [ ]
);

[JScript ]
public Serializable
function SetValue (
   value : Object,
   indices : int [ ]
);

Parameters

value
The new value for the specified element.
indices
A one-dimensional array of indexes that specifies the position of the element to set.

Exceptions


Exception Type Condition
ArgumentNullException indices is a null reference ( Nothing in Visual Basic ).
ArgumentException The number of dimensions in the current Array is not equal to the number of elements in indices.
IndexOutOfRangeException Any element in indices is outside the range of valid indexes for the corresponding dimension of the current Array.

Remarks

The number of elements in indices must equal the number of dimensions in the Array. All elements in the indices array must collectively specify the position of the desired element in the multidimensional Array.

The GetLowerBound and GetUpperBound methods can determine whether any of the values in the indices array is out of bounds.

For more information about conversions, see Convert.

See Also

Array Members   Array.SetValue Overload List   GetLowerBound   GetUpperBound   GetValue Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph