Forum Discussion

Re: cannot apply indexing to an expression of type vardelegate

this problem is occurring  for visual studio 19

3 Replies

  • tphillips's avatar
    tphillips
    Frequent Contributor

    1. What are you trying to do? What are you trying to achieve?

    2. Why are you compiling anything?

    3. How does this relate to TestComplete?

     

    Also, it is better to edit your original comment if you add more information (before someone else has commented) instead of writing a reply to your original message, so it still shows up as an unanswered post 🙂

  • chrislukasik's avatar
    chrislukasik
    Contributor

    I am attempting to compile test complete code in visual studio 19, in the C# language.   This code compiles in visual studio 11/12. 

     

    public string GetText(var obj)

    {

    try

    {

    var.VarDelegate varDelegate = obj["Text"];

    return obj["Text"]["OleValue"].UnWrap().ToString();

    }

     

    This has a compiler error of:    cannot apply indexing with [] to an expression of type var.VarDelegate.

     

     

    • AlexKaras's avatar
      AlexKaras
      Community Hero

      Hi,

       

      Connected Applications are deprecated in TestComplete (though still exist) and might not be updated to be supported by VisualStudio 2019.

      I would recommend to ask Support directly via the https://support.smartbear.com/testcomplete/message/ form and would appreciate it if you update this thread with the reply from Support.