Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
IComparer example
List<ContentItem> list = N2.Context.CurrentPage.Children.ToList<ContentItem>();
list.Sort(delegate(ContentItem x, ContentItem y)
if (string.IsNullOrEmpty(x.Title))
return 1;
else if (string.IsNullOrEmpty(y.Title))
return -1;
return x.Title.CompareTo(y.Title);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment