ILNumerics Ultimate VSILArrayElementTypeGetArrayForWrite Method ILNumerics Ultimate VS Documentation
ILNumerics - The Productivity Machine
Direct reference to inner System.Array storage for write access. Expert interface. Use with care!

[ILNumerics Core Module]

Namespace: ILNumerics
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: (4.14.6369.1422)

public ElementType[] GetArrayForWrite()

Return Value

Type: ElementType
Reference to inner System.Array.

Altering this array can be done directly. If necessary, the array is detached before returned. Watch the column order format of storages in ILNumerics. Keep in mind, the length of the System.Array may exceed the number of elements of the ILNumerics array.

Accessing the inner system array directly should be left to ILNumerics experts only. Unless you really know, what you are doing, you should rather use the higher order access methods provided by ILArray<T>!

For elements of reference types (e.g. ILCell), retrieving and storing elements from/into the System.Array directly obviously does not simulate a value semantic as all other common API methods do! This means, references are copied. Attention must be paid to dereference / clone elements accordingly or (recommended) prevent from using this function with reference element types.

[ILNumerics Core Module]

See Also