Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX 1535: coloring error with as/is

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Oct 03 2006 : 2:14:09 PM
VS2005, C#

When using the C# keywords as or is, the variable preceeding the keyword is colored wrong.

example:
void buttonX_Click(object sender, EventArg e)
{
  Button X = sender as Button;
  if(sender is Button)
     whatever();
}


Obs: basically whenever you start typing after a variable with a space, the variable will be colored wrong, like in nVarX = nVarY typesomethinghere;
2   L A T E S T    R E P L I E S    (Newest First)
Uniwares Posted - Oct 04 2006 : 7:03:43 PM
Not seen it in any other cases, but i guess that the parser simply sees two words, so according to the parsing rules the first one cant be a variable.
feline Posted - Oct 04 2006 : 6:18:36 PM
i see the same thing with your function.

case=2856

are you seeing this in other cases, that do not involve the "as" or "is" keywords?

using the very basic, and slightly silly test:

int foo;
foo = sender + 2;


VA colours both instances of the variable as a variable rather than a type.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000