Novell.Directory.Ldap.LdapConstraints.Clone C# (CSharp) Method

Clone() public method

Clones an LdapConstraints object.
public Clone ( ) : Object
return System.Object
        public System.Object Clone()
        {
            try
            {
                System.Object newObj = base.MemberwiseClone();
                if (controls != null)
                {
                    ((LdapConstraints) newObj).controls = new LdapControl[controls.Length];
                    controls.CopyTo(((LdapConstraints) newObj).controls, 0);
                }
                if (properties != null)
                {
                    ((LdapConstraints) newObj).properties = (System.Collections.Hashtable) properties.Clone();
                }
                return newObj;
            }
            catch (System.Exception ce)
            {
                throw new System.SystemException("Internal error, cannot create clone");
            }
        }