String.Format() - Repassing params but adding more parameters

.net, c#, params-keyword, string-formatting

Solution

public string GetMessage(params object[] otherValues)
{
    return String.Format(this.Message, new[] { this.FirstValue }.Concat(otherValues).ToArray<object>());
}

Problem

I would like to do something like that: ``` public string GetMessage(params object otherValues[]) { return String.Format(this.Message, this.FirstValue, otherValues); } ``` So, I would like to repass an array of params to `String.Format()` but adding a new parameter. What would be the best way to do that, knowing that we could "rebuild" a new array of objects and this doesn't seems good.

Original source