I created the following method, calling it from a BizTalk mapping functoid not long ago.

public string TrimAll(params string[] addressInfo)

{

}

I used params because I need to pass in eight string arguments which I was preforming more or less the same operations on. I was curious to see if BizTalk would resolve the method properly. As you’d expect, it did not, and gave me an exception about the number of arguments needed when I tried to test the map.

No problem! I just overloaded the method in the class, which explicitly contained eight string parameters. I would not need to change the BizTalk map, as it would resolve to this method, which would in turn call the parameterized methods.

public string TrimAll(string address1, string address2,

string address3, string address4, string address5,

string address6, string address7, string address8)

{

return TrimAll(address1, address2,

address3, address4, address5,

address6, address7, address8);

}

But this time, when I tried to test run the map, Visual Studio crashed ungracefully!! So instead of overloading I changed the name of the method…

private string TrimIt(params string[] addressInfo)

…and I called it like this…

return TrimIt(

address1, address2,

address3, address4, address5,

address6, address7, address8);

This time it ran without error. For kicks I changed it to be an overloaded method again and it crashed consistently. The take away here is that you cannot expose any method that uses the params keyword to the BizTalk mapper.