I am not getting very far with the first example. I have the following test piece of code, which compiles quite happily:
void testCastOnControlVariables()
{
Button buttonTest = new Button();
String nameOfButton;
nameOfButton = ((Control)buttonTest).Name;
}
but there is no underlining. If you try calling some other function after the cast does the underlining go away? I am wondering if somehow this is related to the second example, and variable names are a problem.
I am seeing the same problem with the second example, and the problem seems to be the variable name "remove". I have simplified it down, and produced this test case:
void testAddOnList()
{
List<string> remove = new List<string>();
remove.Add("Chocolate cookies"); // here "Add" is underlined as a mistyped symbol
List<string> foodNames = new List<string>();
foodNames.Add("Chocolate bars"); // no underlining here
}
"remove" is shown in italic's when I first type it, before VA realises I am using it as a local variable, so this seems to be a factor.
case=9568