public unsafe object GetValue(int pIndex) { TypedReference reference = new TypedReference(); InternalGetValueReference(&reference, 1, &pIndex); return(TypedReference.InternalToObject(&reference)); }
public unsafe Object GetValue(int index) { if (Rank != 1) { throw new ArgumentException(Environment.GetResourceString("Arg_Need1DArray")); } TypedReference elemref = new TypedReference(); InternalGetReference(&elemref, 1, &index); return(TypedReference.InternalToObject(&elemref)); }
public unsafe Object GetValue(int index) { if (Rank != 1) { throw new Exception("Arg_Need1DArray"); } TypedReference elemref = new TypedReference(); InternalGetReference(&elemref, 1, &index); return(TypedReference.InternalToObject(&elemref)); }
public unsafe Object GetValue(int index1, int index2) { if (Rank != 2) { throw new ArgumentException(Environment.GetResourceString("Arg_Need2DArray")); } int *pIndices = stackalloc int[2]; pIndices[0] = index1; pIndices[1] = index2; TypedReference elemref = new TypedReference(); InternalGetReference(&elemref, 2, pIndices); return(TypedReference.InternalToObject(&elemref)); }
public unsafe Object GetValue(params int[] indices) { if (indices == null) { throw new ArgumentNullException("indices"); } if (Rank != indices.Length) { throw new ArgumentException(Environment.GetResourceString("Arg_RankIndices")); } TypedReference elemref = new TypedReference(); fixed(int *pIndices = indices) InternalGetReference(&elemref, indices.Length, pIndices); return(TypedReference.InternalToObject(&elemref)); }
public unsafe static object ToObject(TypedReference value) { return(TypedReference.InternalToObject((void *)(&value))); }