示例#1
0
文件: StringUp.cs 项目: Tec4Gen/Epam
        public StringUp(StringUp value)
        {
            if (value == null)
            {
                throw new ArgumentException("value " + "object reference not set to an instance of an object.");
            }

            _arrayString = new char[value.Length];
            Array.Copy(value._arrayString, _arrayString, value.Length);
        }
示例#2
0
文件: StringUp.cs 项目: Tec4Gen/Epam
        public void Append(StringUp value)
        {
            //StringUp temp = new StringUp(value);
            if (value == null)
            {
                throw new ArgumentException("value " + "object reference not set to an instance of an object.");
            }

            _arrayString = _arrayString.Concat(value._arrayString).ToArray();
        }
示例#3
0
文件: StringUp.cs 项目: Tec4Gen/Epam
        public bool Equals(StringUp otherstringup)
        {
            if (Object.ReferenceEquals(this, otherstringup))
            {
                return(true);
            }
            if (this.Length != otherstringup.Length)
            {
                return(false);
            }

            for (int i = 0; i < otherstringup.Length; i++)
            {
                if (this[i] != otherstringup[i])
                {
                    return(false);
                }
            }
            return(true);
        }