I have the following class hierarchy
public abstract BaseClass : System.Web.UI.UserControl { public virtual void Process(string sType) { //Do something //Here I want to create a CSV list Ex: 'type1, type2' //Do I need to create a static variable? There might be several controls calling //Process. I need to scope it to the UserControl } }
In a user control that inherits from BaseClass
public void ProcessParams() { base.Process('type1'); base.Process('type2'); }
I would avoid doing this in a static, unless you want to store params from across all instances. You could add a collection to your base class, or have an IEnumerable as the parameter for Process().