locked
Orchestration Expression: String.Concat not working properly RRS feed

  • Question

  • We are migrating from BizTalk 2004 to BizTalk 2006 R2.  One of our orchestration has an expression shape that uses the "System.String.Concat()" method to concatenate five strings together.  This always worked in BizTalk 2004 (with .NET 1.1), but that is not the case in 2006 R2 (with .NET 2.0/3.5).  Whenever I have more than four string/object parameters going into "System.String.Concat()" in an expression, I get a build error:

         'System.String.Concat(str1, " - ", str3, " - ", str5)': ambiguous function call; the arguments match more than one overload

     

    It seems that perhaps it is no longer recognizing the params keyword properly...?  Has anyone seen this before, or know something about it?

     

    Any help is much appreciated.  Thanks in advance!

     

    Sincerely,

        James Greene

    Tuesday, November 20, 2007 10:22 PM

Answers

  • James,

    I haven't seen this error, but I rarely concatenate that many strings in a single statement inside an orchestration. As a workaround, you could just split the Concat() call in two calls, one nested inside the other:

    System.String.Concat(str1, "-", System.String.Concat(str3, "-", str5));
    Friday, November 23, 2007 12:52 PM
    Moderator

All replies

  • James,

    I haven't seen this error, but I rarely concatenate that many strings in a single statement inside an orchestration. As a workaround, you could just split the Concat() call in two calls, one nested inside the other:

    System.String.Concat(str1, "-", System.String.Concat(str3, "-", str5));
    Friday, November 23, 2007 12:52 PM
    Moderator
  • Yes, I've got the same problem. I was lucky having not too much reworking. I transformed one concat to several nested as Tomas mentioned before.
    Friday, November 23, 2007 3:58 PM
    Moderator
  • Is it a bug or a new feature?
     
    Friday, November 30, 2007 5:53 AM
    Moderator