Why is Action/Func better than a regular Method in .Net?
问题 I much prefer using an Action or a Func if I need a quick reusable piece of code, however others on my team don't like them or understand them. At the moment my only real argument is about preference and more up to date code practices, but those are just bad arguments. Why is it better to do this: Action<FormView,String> hideControl = (form,name) => { var button = form.GetControl<Button>(name); if (button != null) button.Visible = false; } than: public static void HideControl<T>(this FormView