Intellisense in my Class

I have a class that includes several collection properties.  One of those is "colors".  I have some custom colors.  However, I have to actually type the key name to retrieve it.  Is there any way to make this like Intellisense, or have the options pop up like the other parts?

For example... Let's say "oClass" is the object, "Colors" is a collection property, and I want to pull "Red"...

oClass.Colors("Red")

oClass.< .Colors this part will pop up already>(<"Red" I have to type this part>)

LVL 2
born4codeAsked:
Who is Participating?
 
BurbbleCommented:
Since a Collection is a dynamic collection of String values, Intellisense cannot work for it.
0
 
Naveen SwamyYash Infinite Solutions Private LimitedCommented:
hi,
use enums for this purpose

Regards,
M.Naveen Swamy
0
 
born4codeAuthor Commented:
ok i can make an enum, but how do i make it pop up w/intellisense?
0
 
cjardCommented:
in the time it takes you to get this question answered, you probably could have writted "Red" many times... :)
0
 
born4codeAuthor Commented:
Ha.  Yes, but I have a zillion other things I can use it for.

I guess no one knows really how to do this.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.