I have a list with methods
List<Action<object>> methods_1 = new List<Action<object>>(); methods_1.Add(delete); methods_1.Add(upload); methods_1.Add(open); How to call this or that method from this list?
I have a list with methods
List<Action<object>> methods_1 = new List<Action<object>>(); methods_1.Add(delete); methods_1.Add(upload); methods_1.Add(open); How to call this or that method from this list?
Source: https://ru.stackoverflow.com/questions/610232/
All Articles
methods_1[1].Invoke(), but packing methods into a collection is a strange practice. There are delegates. - Bulson