Compile error while combining two variables to a string

2 posts, 0 answers
  1. Jiyoon
    Jiyoon avatar
    1 posts
    Member since:
    Jun 2018

    Posted 20 Jul 2018 Link to this post

    I have a line of code to combine two variables:

    string expectedValue = $"{testVariable1}-{testVariable2}";

    This works fine when I execute this from Visual Studio plug-in but I get an compile error in Test Studio with a message, ": error CS1056: Unexpected character '$'".  Is this a known issue?




  2. Elena
    Elena avatar
    1223 posts

    Posted 25 Jul 2018 Link to this post

    Hi Jiyoon,

    Thank you for reaching us out. 

    The reason you have encountered that error is that Test Studio and Visual Studio compile the code with different engines. To be able to compile that code with Test Studio you will need to downgrade it to be compatible with C#5. 

    I hope this is helpful for you! 

    Elena Tsvetkova
    Progress Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top