I have the following scenario:
I have three classes, let\'s call them A, B and C. All they have in common is that they inherit fro
A
B
C
You can apply dynamic keyword when passing entity to ProcessEntity. In this case actual type of entity will be determined at runtime.
dynamic
public void MyMethod(List entityList) { foreach(var entity in entityList) { dynamic obj = entity; ProcessEntity(obj); } }