Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 More color confusion: delegates, constructors
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nels_P_Olsen
Senior Member

USA
47 Posts

Posted - Jan 09 2004 :  2:35:35 PM  Show Profile
Here are some more issues with coloring identifiers in C#. I'm not sure if this behavior is intentional or not in some cases, since you could argue either way:

1. Constructor names (and I assume destructors and static initializers) appear in the "class" color. I would expect them to appear in the "method" color.

2. User-defined delegates appear in the "method" color, at least when used with "new". Standard .NET delegates don't. I'm not sure which it should do ... technically, they're calls to the constructor, so both should have the "method" color?

3. Method identifiers passed to a delegate constructor appear in the "variable" color. They're like "function pointers" in this situation, so the argument that they should be in the "variable" color has some merit, but I still expected them in the "method" color ...

- Nels

Edited by - Nels_P_Olsen on Jan 09 2004 6:18:25 PM

Nels_P_Olsen
Senior Member

USA
47 Posts

Posted - Jan 09 2004 :  3:42:20 PM  Show Profile
Same with C# event raising. Events are actually subclasses of MultiCastDelegate, and that class's constructor is actually being called, so the event identifier should appear in the "method" color when the event is raised, not the "variable" color.

- Nels
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000