ArrayPutT Function (Array OfT, DWord, T)
|
|
向数组元素写入值。
命名空间:
XSharp.RT
程序集:
XSharp.RT (在 XSharp.RT.dll 中) 版本:2.24 GA
Syntax FUNCTION ArrayPut<T>(
aTarget AS ARRAY OF<T>,
dwElement AS DWORD,
uValue AS T
)
AS T
public static T ArrayPut<T>(
Array Of<T> aTarget,
uint dwElement,
T uValue
)
Request Example
查看代码Parameters
- aTarget
- 类型:Array OfT
要写入的数组。 - dwElement
- 类型:DWord
要接收值的数组元素编号。 - uValue
- 类型:T
要写入数组元素的值。
Type Parameters
- T
- The type of the array elements
Return Value
类型:
T
被赋予的值。
备注
ArrayPut() 向指定的数组元素写入值。
如果该元素已有值,则会被覆盖。
Examples
此示例向数组元素写入值:
1FUNCTION Start()
2 LOCAL aStates[2]
3 ArrayPut(aStates, 1, "蒙大拿")
4 ArrayPut(aStates, 2, "怀俄明")
5
6 aStates[1] := "蒙大拿"
7 aStates[2] := "怀俄明"
See Also