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
 VAX 1218 Enumeration coloring in certain cases
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kschaab
Tomato Guru

USA
118 Posts

Posted - Mar 04 2004 :  6:40:19 PM  Show Profile
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.
  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