TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mike Read
NA
2
5.8k
how do I create a struct similar to system.drawing.color
Jul 23 2010 5:42 PM
I want a struct in my code that is similar in functionality to System.Drawing.Color.
basically, I want a "user friendly" way to access properties (or really for someone to understand my code)
instead of :
something = 0;
switch (something) {
case 0: ....
case 1: ....
}
I want:
something = something.FriendlyValueName;
switch (something) {
case something.FriendlyValueName: ...
case something.DifferentFriendlyValueName: ...
}
for example, with Color...
System.Drawing.Color ABC = new System.Drawing.Color.White;
switch (ABC) {
case System.Drawing.Color.Black: ...
case System.Drawing.Color.White: ...
}
does that make any sense?
Reply
Answers (
1
)
inheriting from usercontrol
shadow copying and updaters