Custom Data Types

Posted by Tinkerer_CardTracker on Stack Overflow See other posts from Stack Overflow or by Tinkerer_CardTracker
Published on 2010-04-10T19:25:59Z Indexed on 2010/04/10 19:33 UTC
Read the original article Hit count: 279

Filed under:
|
|

Hello, quick question:

I'd like to create some custom data types, but I don't think I'm asking the right question(s).

There are "compound Boolean" values used throughout .NET, and I want to design some of my own. I've been using a series of Boolean variables, which works, but just isn't the same.

Examples from .NET include: Color.Black Alignment.Centered [fontProperties].Bold* *I forget the actual name, but you get the idea

I want to make something like this:

ColorSortQualities

  • None
  • DistinguishColor
  • DistinguishNumberOfColors
  • DistinguishColorPattern

Once that's been declared, I could do this: if(searchOptions.ColorSortQualities == DistinguishColor) [do stuff]

What is this called?

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET