It is possible to do something like this on C#? I want a generic void for calling differents methods from another class.
public class custom{
public void A(){}
public void B(){}
}
void doSomething(List<custom> laux, method m ){
foreach(var aux in laux){
aux.m; //something like this
}
}
void main(){
doSomething(new List<custom>(),A);
doSomething(new List<custom>(),B);
}