kschaab
Tomato Guru
USA
118 Posts |
Posted - Mar 04 2004 : 6:40:19 PM
|
This is for C#. When I have an enumeration and then I have an accessor with the enumeration name in a class with indentifiers that match the enumeration member names they change to be colored as members instead. Now that I've completely confused you I'll give and example. I've got the following enum:
[Flags] public enum ValidationResult { None = 0, Failed = 1, Passed = 2, Partial = 4, PartialFail = Failed | Partial, PartialPassed = Passed | Partial }
And then a class:
public class ValidationInfo { public ValidationResult ValidationResult { get { return this.result; } }
public bool Failed { get { return (this.ValidationResult & ValidationResult.Failed) != 0; } }
public bool Passed { get { return (this.ValidationResult & ValidationResult.Passed) != 0; } }
public bool Partial { get { return (this.ValidationResult & ValidationResult.Partial) != 0; } }
With this ValidationResult.Passed, ValidationResult.Failed, and ValidationResult.Partial have now changed syntax colors. |
|