public void SetValue(string name, object value)
        {
            PropertyDescriptorCollection properties;

            properties = TypeDescriptor.GetProperties(this);
            PropertyDescriptor[] newProps = new PropertyDescriptor[this.Count + properties.Count];
            var propertyInfo = this.GetType().GetProperty(name);

            if (propertyInfo != null)
            {
                propertyInfo.SetValue(this, value);
            }
            else
            {
                for (int i = 0; i < this.Count; i++)
                {
                    CustomProperty prop = (CustomProperty)this[i];
                    if (prop.Name == name)
                    {
                        prop.Value = value;
                    }
                }
            }
        }
 public CustomPropertyDescriptor(ref CustomProperty myProperty, Attribute[] attrs) : base(myProperty.Name, attrs)
 {
     m_Property = myProperty;
 }
 /// <summary>
 /// Add CustomProperty to Collectionbase List
 /// </summary>
 /// <param name="Value"></param>
 public void Add(CustomProperty Value)
 {
     base.List.Add(Value);
 }