asked on
List<baseType> myList = new List<baseType>();
myList.Add(someChild1);
myList.Add(someChild2);
foreach(myClass my in myClassList)
{
foreach(baseType b in myList)
{
b.DoSomething(common1, common2, my.different1);
b.DoSomething(common1, common2, my.different2);
b.DoSomething(common1, common2, my.different3);
}
}
//////
abstract class baseType<T>
{
public abstract void DoSomething(common1, common2, List<T>);
}
//////
class someChild1 : baseType<different1>
{
public override void DoSomething(common1, common2, different1){...}
}
class someChild2 : baseType<different2>
{
public override void DoSomething(common1, common2, different2){...}
}
ASKER
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
Then you can use a List.