Hi,
I've read the topic about passing an object[] to a params object[] but I don't know why it's not working with me.
I have these too functions in a class:
...
private void CallbackEvent(object source, CallbackEvetArgs e) { // Some event with e.Data as string
...
string[] values = e.Data.Split('|');
DoSave("save", values.Skip(1).Cast<object>().ToArray());
...
}
...
public void DoSave(string action, params object[] values) {
...
string value1 = values[0];
...
}
...
but instead of receiving an string in value1, value1 is receiving the whole array (string[]) and therefore an invalid casting exception.
What am I doing wrong?