System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at KTZH.Sozialhilfehandbuch.GesetzeAnzeige.GesetzMatch.get_Kapitel()
at KTZH.Sozialhilfehandbuch.GesetzeAnzeige.GesetzMatch.get_MainKap()
at KTZH.Sozialhilfehandbuch.GesetzeAnzeige.GesetzMatch.CompareTo(Object obj)
at System.Collections.Comparer.Compare(Object a, Object b)
at System.Collections.Generic.ObjectComparer`1.Compare(T x, T y)
at System.Collections.Generic.ArraySortHelper`1.SwapIfGreaterWithItems(T[] keys, IComparer`1 comparer, Int32 a, Int32 b)
at System.Collections.Generic.ArraySortHelper`1.QuickSort(T[] keys, Int32 left, Int32 right, IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
--- End of inner exception stack trace ---
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)
at System.Collections.Generic.List`1.Sort()
at KTZH.Sozialhilfehandbuch.GesetzeAnzeige.GesetzeAnzeigeUserControl.SearchGesetze(String search)
at KTZH.Sozialhilfehandbuch.GesetzeAnzeige.GesetzeAnzeigeUserControl.RenderGesetze(String search)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at Softec.Sharepoint.Framework.SoftecUserControl.OnLoad(EventArgs e)