473,799 Members | 3,080 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best practice for organizing Constant

I have about 50 string constants that I put all of them in one file. I find
that it's too un-organized because I have to intellisense thru lots of
unrelated constant to get to the one I want. Is there a best practice for
organizing constant? Please share with me your thoughts and experiences.

Thanks so much in advance.

Jun 20 '06 #1
2 1320
Creating a custom configuration class and make them XML driven.
http://openmymind.net/index.aspx?documentId=5

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ethan V" <aa*@aaa.aaa> wrote in message
news:OS******** ******@TK2MSFTN GP04.phx.gbl...
I have about 50 string constants that I put all of them in one file. I find
that it's too un-organized because I have to intellisense thru lots of
unrelated constant to get to the one I want. Is there a best practice for
organizing constant? Please share with me your thoughts and experiences.

Thanks so much in advance.

Jun 20 '06 #2
create a seperate class for each group of related constants. this will give
a nice dot notation. you can still use one file.
-- bruce (sqlwork.com)

"Ethan V" <aa*@aaa.aaa> wrote in message
news:OS******** ******@TK2MSFTN GP04.phx.gbl...
I have about 50 string constants that I put all of them in one file. I find
that it's too un-organized because I have to intellisense thru lots of
unrelated constant to get to the one I want. Is there a best practice for
organizing constant? Please share with me your thoughts and experiences.

Thanks so much in advance.

Jun 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4084
by: Miranda Evans | last post by:
Seeking reference material (a url, a book, an article) that offers advice and guidelines for organizing classes within files. For example, assume two classes: 1) SuperABC - a superclass 2) InheritorABC - a class that inherits from SuperABC I can think of two ways of organizing these classes within files: 1) One class per file: - the file SuperABCClass.py contains the source code for the class
136
9460
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
10
3263
by: Rada Chirkova | last post by:
Hi, at NC State University, my students and I are working on a project called "self-organizing databases," please see description below. I would like to use an open-source database system for implementation and would really appreciate your opinion on whether PostgreSQL is suitable for the project. In general, I am very impressed by the quality of PostgreSQL code and documentation, as well as by the support of the developer community. ...
9
1936
by: Bryan Hepworth | last post by:
Hi Everyone I'm wondering what the best practice is for a particular task I'm trying to accomplish. I'm using two sets of radio buttons for a user to select values from. These values then go into a couple of tables to show some heat loss calculations depending on the values chosen I want the tables to have the relevant values filled in. Is the best way to accomplish this a long list of if then else type statements or is there a better...
13
3116
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
16
2820
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
66
3744
by: KimmoA | last post by:
Hey! Some questions about C that have been bugging me for a while... 1) Is inline a valid C keyword or not? I was kind of surprised of not finding it in C, to be honest. My "The C Programming Language" book doesn't mention it. 2) I understand that C doesn't care about whitespace that much, but why did they make it impossible to use the minus ('-') char in variable names? I now have to incorrectly name my "hi-score" variable "hiscore"....
13
1824
by: Justin.Voelker | last post by:
Hello Everyone: I am in search of an easier way to develop pages. My most current website, www.Base2WebDesign.com, has the exact same layout throughout the entire site. Right now I use a function called "page_top()" and page_bottom()" that , when called, display the tops and bottoms of pages. All I have to do on the actual index.php page is call those two functions and then write the main content on that page. This seems stupid but...
4
5146
Colloid Snake
by: Colloid Snake | last post by:
Hello- I'm installing a new device due to the shoddy administration of a few servers I recently came to admin, and I was wanting to make sure a constant problem they were having didn't happen again. The / (root) dir would routinely fill up, leaving the other partition where the app was running, at maybe 20% utilization, but the app would be worthless as we wouldn't be able to do anything on the box (and the app would start to fail as...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10484
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.