System.Runtime.Serialization.AttributeData.ElementData.ElementData.GrowAttributesIfNeeded C# (CSharp) Method

GrowAttributesIfNeeded() private method

private GrowAttributesIfNeeded ( ) : void
return void
        private void GrowAttributesIfNeeded()
        {
            if (attributes == null)
                attributes = new AttributeData[4];
            else if (attributes.Length == attributeCount)
            {
                AttributeData[] newAttributes = new AttributeData[attributes.Length * 2];
                Array.Copy(attributes, 0, newAttributes, 0, attributes.Length);
                attributes = newAttributes;
            }
        }
    }
AttributeData.ElementData.ElementData