GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoLayerCollection Class / SortByZOrder Method / SortByZOrder(GoObject[]) Method
an array of GoObjects in layers of this layer collection; this array is modified
In This Topic
    SortByZOrder(GoObject[]) Method
    In This Topic
    Sort an Array of GoObjects by their Z-order position in these layers.
    Syntax
    public void SortByZOrder( 
       GoObject[] a
    )

    Parameters

    a
    an array of GoObjects in layers of this layer collection; this array is modified
    Remarks

    This method does not modify the order of any objects in any layer--it simply modifies the argument array by sorting the objects by their current Z-order in these layers. For example, if you have a few selected objects, you can use this method to find the selected object which is in front of the other selected objects. That would be the last object in the array after calling this method.

    If one or more elements of the argument array a are not GoObjects that belong to one of these layers, the resulting sort order is indeterminate. In many circumstances you can easily create an array of GoObjects by calling CopyArray.

    See Also