Landis.Harvest.StandSpreading.GetRanking C# (CSharp) Method

GetRanking() public method

Gets the ranking for an unharvested stand from among the whole set of stand rankings.
public GetRanking ( Stand stand ) : StandRanking
stand Stand
return StandRanking
        public StandRanking GetRanking(Stand stand)
        {
            //  Search backward through the stand rankings because unharvested
            //  stands are at the end of the list.
            for (int i = rankings.Length - 1; i >= 0; i--) {
                if (rankings[i].Stand == stand)
                    return rankings[i];
            }
            throw new System.ApplicationException("ERROR: Stand not found in rankings");
        }