N2 API Documentation
MoteToIndex Method (siblings, itemToMove, newIndex)
NamespacesN2UtilityMoteToIndex(IList<(Of <ContentItem>)>, ContentItem, Int32)
Moves an item in a list to a new index.
Declaration Syntax
C#Visual BasicVisual C++
public static void MoteToIndex(
	IList<ContentItem> siblings,
	ContentItem itemToMove,
	int newIndex
)
Public Shared Sub MoteToIndex ( _
	siblings As IList(Of ContentItem), _
	itemToMove As ContentItem, _
	newIndex As Integer _
)
public:
static void MoteToIndex (
	IList<ContentItem^>^ siblings, 
	ContentItem^ itemToMove, 
	int newIndex
)
Parameters
siblings (IList<(Of <ContentItem>)>)
A list of items where the item to move is listed.
itemToMove (ContentItem)
The item that should be moved (must be in the list)
newIndex (Int32)
The new index onto which to place the item.
Remarks
To persist the new ordering one should call UpdateSortOrder(IEnumerable<(Of <ContentItem>)>) and save the returned items. If the items returned from the GetChildren()() are moved with this method the changes will not be persisted since this is a new list instance.

Assembly: N2 (Module: N2) Version: 1.0.204.35916