public void DoSomething(string somethingToDo) { _aDeed = somethingToDo; if (null != SomethingWasDone) { SomethingWasDone.Invoke(_aDeed); } // Try sending an array. var paramArray = new ParamStruct[] { new ParamStruct() { Key = "Key1", Value = "Value1" }, new ParamStruct() { Key = "Key2", Value = "Value2" } }; if (null != ParamsWereSent) { ParamsWereSent.Invoke(paramArray, paramArray.Length); } }
public void SendParameters(ParamStruct[] paramArray) { _paramArray = paramArray; if (null != ParamsWereSent) { ParamsWereSent.Invoke(_paramArray, _paramArray.Length); } }