473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

IntelliSense - Structure to behave like an Enumeration

Hi. I’ve noticed that in when setting a variable of type Color to something inVB.NET, that IntelliSense gives you a list of Color structures when you hit equals as though the structure were an enumeration. I am wondering if it is possible to duplicate this behaviour.

I have created a structure that has shared properties that return instances of that structure to act as though it were an enumeration, but I would like to get IntelliSense to automatically display those properties in a list when I hit equals after a variable declared as my structure.

Any ideas?
Sep 10 '08 #1
4 1550
Plater
7,872 Expert 4TB
Those are all just public static properties of the Color struct I think.
So all you would need to do would be add public static properties to your struct
Sep 10 '08 #2
Those are all just public static properties of the Color struct I think.
So all you would need to do would be add public static properties to your struct

Yes, that is exactly what I have done, and obviously I can access them by first putting in the name of my class, but IntelliSense does not automatically display them after hitting equals like it does for the Color structure.
Sep 10 '08 #3
Curtis Rutland
3,256 Expert 2GB
Hmm, that's a strange one. I don't usually work with structs. I know I get the behavior you want when I work with enums. Wish I could help.
Sep 11 '08 #4
Plater
7,872 Expert 4TB
Hmm, the color struct also has the following properties that might help it?
Expand|Select|Wrap|Line Numbers
  1. [Serializable]
  2. [TypeConverter(typeof(ColorConverter))]
  3. [Editor("System.Drawing.Design.ColorEditor, System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
  4. [DebuggerDisplay("{NameAndARGBValue}")]
  5.  
Sep 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ben R. Bolton | last post by:
I have found that Intellisense sometimes works and sometimes doesn't. I have yet to detect a consistant pattern, but have observed that if I define a public enum in one project, that enum is...
1
by: Eric Robishaw | last post by:
OK...going nuts here: If i have a variable of type X that is an enumeration, how do I get intellisense to fill in the prefix for me? i.e.,: when I type: if (e.Action = I want intellisense...
2
by: Marco | last post by:
Why c# intellisense is more powerful than c++ intellisense? In c# when type a character intellisense start and guide me.In c++ intellisense start only when I type a . or -> or ::. In c# user class...
3
by: Don | last post by:
Hi: I want to limit the values that can be entered for particular attributes. 1) I have created an XSD from my XML document. 2) I dropped that XSD file into the following directory...
6
by: Eric Smith | last post by:
Is a structure containing an incomplete array as its last element (per paragraph 2 of section 6.7.2.1 of ISO/IEC 9899:1999 (E)) itself an incomplete type? That appears to be indicated by paragraph...
6
by: stuie_norris | last post by:
Hi Group, I am trying to define a strucutre of constants. Then switch on this structure of constant values. In the following example of my problem the code fails to compile due to: case...
1
by: Steve Long | last post by:
Anybody know how to make intellisense show a drop down the list of an enum as a method argument like it does for .NET types? Example: public enum eGroupPlacements { GRP_RECORD, GRP_REPORT...
10
by: Michael Feld | last post by:
Hello, does anyone know how to produce a data type which offers Enum-like IntelliSense in VS 2005? What I am trying to create is a type which is very similar to an enum, i.e. has a fixed set of...
5
by: amit | last post by:
how to stop or change structure padding ???
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.