Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 C#: no 'fixed' and anonymous 'delegate' var defs

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
.oisyn Posted - Apr 26 2010 : 5:08:13 PM
VAX doesn't seem to understand the variable definitions introduced by fixed blocks and anonymous delegates in C#.

void Foo(int[] array)
{
    fixed (int * ptr = array) // not recognized
    {
        Bar(ptr);             // 'ptr' does not color as a variable
    }

    SomeDelegate d = delegate(int b) { return 2*b; }; // the same with 'b'
}
2   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Apr 28 2010 : 2:18:09 PM
I am seeing the same effect here. Thank you for the clear description.

fixed statement is case=43424

anonymous method is case=43425

.oisyn Posted - Apr 26 2010 : 5:12:23 PM
Some more info I just figured out:
Both 'b' and 'ptr' in previous example do color as a variable at the site of definition, but not when used. However, when placing the caret on or around the definitions, they all suddenly color in the default text color. Also note that neither the definitions nor their uses actually have red error underlines.

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