Wombat.MamaMsg.updateVectorI8 C# (CSharp) Method

updateVectorI8() public method

Update an array of signed 8 bit integers.
public updateVectorI8 ( string name, ushort fid, sbyte val ) : void
name string
fid ushort
val sbyte
return void
        public void updateVectorI8(
			string name,
			ushort fid,
			sbyte[] val)
        {
            EnsurePeerCreated();
            IntPtr ptr = Marshal.AllocHGlobal(val.Length);
            try
            {
                byte[] loc = new byte[val.Length];
                for (int i = 0; i < val.Length; i++)
                {
                    loc[i] = (byte)val[i];
                }
                Marshal.Copy(loc, 0, ptr, val.Length);
                int code = NativeMethods.mamaMsg_updateVectorI8(nativeHandle, name, fid, ptr, val.Length);
                CheckResultCode(code);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
MamaMsg