Realms.ListHandle.Insert C# (CSharp) Method

Insert() public method

public Insert ( IntPtr targetIndex, ObjectHandle objectHandle ) : void
targetIndex System.IntPtr
objectHandle ObjectHandle
return void
        public void Insert(IntPtr targetIndex, ObjectHandle objectHandle)
        {
            NativeException nativeException;
            NativeMethods.insert(this, targetIndex, objectHandle, out nativeException);
            nativeException.ThrowIfNecessary();
        }

Usage Example

コード例 #1
0
        public void Insert(int index, T item)
        {
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(index));
            }

            Execute(item, obj =>
            {
                AddObjectToRealmIfNeeded(obj);
                _listHandle.Insert(index, obj.ObjectHandle);
            },
                    value => _listHandle.Insert(index, value),
                    value => _listHandle.Insert(index, value),
                    value => _listHandle.Insert(index, value));
        }
All Usage Examples Of Realms.ListHandle::Insert