cannot apply indexing to an expression of type vardelegate
This is giving me a visual studio compiler error of
cannot apply indexing with  to an expression of type var.VarDelegate
Solved! Go to Solution.
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 🙂
Senior SQA Automation Engineer
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)
var.VarDelegate varDelegate = obj["Text"];
This has a compiler error of: cannot apply indexing with  to an expression of type var.VarDelegate.
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.
/Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.