The base class WebPart has a property defined like this:
[WebBrowsable(true)]
public virtual string CatalogIconImageUrl { get; set; }
Can I have a child class which will just override the attribute as shown below? I have tried but it doesn’t work.
[WebBrowsable(false)]
public override string CatalogIconImageUrl
{
get
{
return base.CatalogIconImageUrl;
}
set
{
base.CatalogIconImageUrl = value;
}
}
The base class is a .NET framework class, documented here:
i am not a 100% sure but should the code be more like
this is so the variable is attached to the child object and the variable will still be available when the CatalogIconImageUrl property is called by the parent class/type.