Have an object that is an array (not an arraylist or generic) that could contain a collection of everything ...
[[One],[Two],[Three],[Four]]
Want to move [Four] before [Two], for example. oldIndex = 3, newIndex = 1 so the result will be ...
[[One],[Four][Two],[Three]]
What is the most efficient way to do this in .NET 2.0, for example.
PropertyInfo oPI = ObjectType.GetProperty("MyArray", BindingFlags.Public | BindingFlags.Instance);
object ObjectToReorder = oPI.GetValue(ParentObject, null);
Array arr = ObjectToReorder as Array;
int oldIndex = 3;
int newIndex = 1;
early
source
share