Recent Posts - Subscribe Here

Calling external C# assemblies with overloaded methods using the params keyword in BizTalk 2010

Published - Friday, January 13, 2012

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.

Labels: BizTalk, C#, Mapping

Reading lists

Here is some of what I have been reading lately

Software Books

Non Fiction


I am Kevin Kinnett, a software developer in Atlanta, GA.More about me.

profile for aceinthehole on Stack Exchange, a network of free, community-driven Q&A sites

Innovative Architects

I am a Senior Software Engineer/Consultant working for Innovative Architects.

Innovative Architects is a Gold Certified Microsoft Consulting company located in Duluth, GA, right outside of Atlanta.

I am mainly engaged with BizTalk development projects, although I also specialize solving business needs using ASP.NET, and Sharepoint among others.


I my previous position I was a Software Engineer working for ADAM Inc.

Adam specializes in software for employers, benefits brokers and healthcare organizations which provide customizable health solutions to help hospitals, managed care organizations, and consumer web sites become an integral part of the online consumer healthcare experience.

I was responsible for several mission critical applications, including being on the 2 person team that was charged with the final stages of the rewrite of the company’s flagship product


In a previous position I was a Software Engineer working for Nexidia

Nexidia has applied years of research and development to deliver a comprehensive range of solutions for audio and video search. Nexidia works with some of the world’s largest contact centers, rich media companies, government agencies, and legal firms to help them realize the amazing possibilities now discoverable in audio and video content.

I was part of serveral .NET application development projects including standalone tools, applications, and frameworks used to perform system testing, automated functional testing, load testing, and automated UI testing. Also applications for continous integration and automated deployment of configurable complex data sets into installed products.


While attending Kennsaw State University I majored in Computer Science

While in the STARS program, I developed a software application to keep track of the audio/visual equipment the department loans out, which is currently in use and written in Java Swing and uses a MySQL database for persistence

In the morning