LibiadaCore.Core.CongenericChain.GetOccurrence C# (CSharp) 메소드

GetOccurrence() 공개 메소드

Returns position of given occurrence of element of this chain. If occurrence not found returns -1.
public GetOccurrence ( int occurrence ) : int
occurrence int /// Occurrence to find. ///
리턴 int
        public int GetOccurrence(int occurrence)
        {
            if (occurrence - 1 >= positions.Count)
            {
                return -1;
            }

            return positions[occurrence - 1];
        }