c# create action from method code example
Example: action delegate c#
private void ShowContentThreadSafe(int level)
{
if (UcView.TreeList.InvokeRequired)
{
UcView.TreeList?.Invoke(new Action1<int>(a => ShowContent(level)));
}
else
ShowContent(level);
}