Nels_P_Olsen
Senior Member
USA
47 Posts |
Posted - Jan 09 2004 : 2:35:35 PM
|
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
|
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 |
|
|