I have the following code:
public List FindStepsByType(IWFResource res)
{
List retval = new List&
No, it will not be removed automatically. In this sense, there's not a difference between an anonymous method and a "normal" method. If you want, you should manually unsubscribe from the event.
Actually, it'll capture other variables (e.g. res
in your example) and keep them alive (prevents garbage collector from collecting them) too.