Segmenter.Base.Sequences.ComplexChain.Equals C# (CSharp) Method

Equals() public method

The equals.
public Equals ( ComplexChain complexChain ) : bool
complexChain ComplexChain /// The complex chain. ///
return bool
        public bool Equals(ComplexChain complexChain)
        {
            if (complexChain.GetLength() != GetLength())
            {
                return false;
            }

            for (int index = 0; index < complexChain.GetLength(); index++)
            {
                if (!this[index].ToString().Equals(complexChain[index].ToString()))
                {
                    return false;
                }
            }

            return true;
        }

Usage Example

 public void ClearAtTest()
 {
     var secondComplexChain = new ComplexChain("AGTC");
     var firstComplexChain = new ComplexChain("ATC");
     secondComplexChain.ClearAt(1);
     Assert.True(firstComplexChain.Equals(secondComplexChain));
 }
All Usage Examples Of Segmenter.Base.Sequences.ComplexChain::Equals