Longkong.ColorPicker.Controls.ColorSwatchPanel.DoesColorAlreadyExist C# (CSharp) Method

DoesColorAlreadyExist() private method

private DoesColorAlreadyExist ( Color c ) : bool
c Color
return bool
        private bool DoesColorAlreadyExist( Color c )
        {
            bool doesColorAlreadyExist = false;

            ColorSwatch[] swatches = ( ColorSwatch[] ) m_swatches.ToArray( typeof( ColorSwatch ) );

            for ( int i=0; i < swatches.Length; i++ ) {

                if ( swatches[ i ].Color.Equals( c ) ) {

                    doesColorAlreadyExist = true;
                    break;

                }

            }

            return doesColorAlreadyExist;
        }