Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 113137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:39:18+00:00 2026-05-11T02:39:18+00:00

I was using .Net Reflector on an Internal App to try and understand what

  • 0

I was using .Net Reflector on an Internal App to try and understand what the previous Dev was doing and also to learn. I have never had actual instruction on how to develop Apps so I take from where I can (Hooray Stack Overflow). That being said I found something that has me confused. A class Library called WinConstant containing the below code.

Here are my actual question:

  1. What possible use could this be?

  2. What value is there in storing a bunch of constant’s in a class library?

  3. Is this considered a ‘Best Practice’?

Thoughts and guidance appreciated!

 Public Class clsConstant     Public Const cAccess As String = 'Access'     Public Const cAddress As String = 'Address'     Public Const cCancel As String = 'Cancel'     Public Const cCity As String = 'City'     Public Const cClear As String = 'Clear'     Public Const cClickOnMessage As String = 'Click on any row in top pane to see the detail fields in the bottom pane.'     Public Const cClientID As String = 'ClientID'     Public Const cColon As String = ': '     Public Const cComma As String = ','     Public Const cContactID As String = 'ContactID'     Public Const cCounty As String = 'County'     Public Const cDash As String = '-'     Public Const cDelete As String = 'Delete'     Public Const cDepartment As String = 'Department'     Public Const cError As String = 'Error'     Public Const cExec As String = 'Exec'     Public Const cFalse As String = 'False'     Public Const cFavorite As String = 'Favorite'     Public Const cFederal As String = 'Federal'     Public Const cFriday As String = 'Friday'     Public Const cfrmMain As String = 'frmMain'     Public Const cfrmModuleLogin As String = 'frmModuleLogin'     Public Const cfrmModuleSplash As String = 'frmModuleSplash'     Public Const cHelp As String = 'Help'     Public Const cHint As String = 'Hint'     Public Const cImagePath As String = '../../image'     Public Const cIn As String = 'In'     Public Const cInformation As String = 'Information'     Public Const cInitialScreenID As String = 'InitialScreenID'     Public Const cInsert As String = 'Insert'     Public Const cJuvenileID As String = 'JuvenileID'     Public Const cLetter As String = 'Letter'     Public Const cManual As String = 'Manual'     Public Const cMasterID As String = 'MasterID'     Public Const cModuleID As String = 'ModuleID'     Public Const cModuleName As String = 'ModuleName'     Public Const cMonday As String = 'Monday'     Public Const cName As String = 'Name'     Public Const cNegative As String = 'Negative'      _     Public Shared ReadOnly cNLowDate As DateTime = New DateTime(&H851055320574000)      _     Public Shared ReadOnly cNullDate As DateTime = New DateTime     Public Const cNullDateString As String = '12:00:00 AM'     Public Const cOfficeIDDefault As String = '01'     Public Const cOne As Integer = 1     Public Const cOut As String = 'Out'     Public Const cPopUp As String = 'PopUp'     Public Const cPositive As String = 'Positive'     Public Const cProcess As String = 'Process'     Public Const cProviderID As String = 'ProviderID'     Public Const cQuestion As String = 'Question'     Public Const cRead As String = 'Read'     Public Const cReferralID As String = 'ReferralID'     Public Const cReminder As String = 'Reminder'     Public Const cReport As String = 'Report'     Public Const cReportEngine As String = 'ReportEngine'     Public Const cReportEnginePath As String = 'ReportEnginePath'     Public Const cReportingServices As String = 'ReportingServices'     Public Const cReportServer As String = 'ReportServer'     Public Const cReportService As String = 'ReportService'     Public Const cReportServiceLocal As String = 'ReportServiceLocal'     Public Const cReportServiceServer As String = 'ReportServiceServer'     Public Const cSaturday As String = 'Saturday'     Public Const cSearch As String = 'Search'     Public Const cSelect As String = 'Select'     Public Const cSpace As String = ' '     Public Const cSQLLoginError As String = 'SQL Server login/password invalid'     Public Const cStart As String = 'Select a module'     Public Const cState As String = 'State'     Public Const cSubjectID As String = 'SubjectID'     Public Const cSunday As String = 'Sunday'     Public Const cThursday As String = 'Thursday'     Public Const cTooltipCancel As String = 'Reset form data values back to before all manual changes.'     Public Const cTooltipClear As String = 'Clears all data entry fields prior to an Insert'     Public Const cTooltipClient As String = 'Display a Client popup window.'     Public Const cTooltipClose As String = 'Close this form'     Public Const cTooltipDelete As String = 'Delete the current record being displayed, no undo possible.'     Public Const cTooltipExe As String = 'Initiate a batch process.'     Public Const cTooltipInsert As String = 'Insert a brand new record'     Public Const cTooltipSearch As String = 'Perform a Search for values entered.'     Public Const cTooltipSelect As String = 'Perform a Select for values entered.'     Public Const cTooltipUpdate As String = 'Update an existing record'     Public Const cTrue As String = 'True'     Public Const cTuesday As String = 'Tuesday'     Public Const cUnderscore As String = '____________________________________________________________'     Public Const cUpdate As String = 'Update'     Public Const cWarning As String = 'Warning'     Public Const cWeb As String = 'Web'     Public Const cWednesday As String = 'Wednesday'     Public Const cWorkerID As String = 'WorkerID'     Public Const cZero As Integer = 0     Public Shared strLongDate As String() = DateAndTime.Now.ToLongDateString.Split(New Char() { ','c })     Public Shared strModuleMainStatusStripFormID As String = Nothing End Class 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:39:18+00:00Added an answer on May 11, 2026 at 2:39 am

    Back in the days of coding windows applications in c, there were similar files #included in windows which consisted of long lists of #defines creating constants. Various c applications emulated this approach in their own files. The ‘class’ seems to be a ‘transliteration’ of this ‘c-ism’. The fundamental principle of Object Oriented Design is to mix code and data into related functional units: objects. As jfullerton wrote:

    From a programming point of view, object-orientation involves program objects, encapsulation, inheritance, and polymorphism. The conceptual objects are modeled in the program code. Encapsulation keeps an object’s data and methods that use the data together as part of the object.

    So clearly, this constant list does not conform to OO practices but is a throw back to the old days.

    To answer your questions:

    1. — This class holds constants, that is it
    2. — The old developer probably did this because that was what he was used to doing
    3. — It’s not current best practices.

    Naturally, if this is part of your application, you can’t just throw this away. Rather, this is something to refactor over time, assuming you use current best practices of Test Driven Development and Refactoring

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It's okay to use the style attribute for elements: This… May 11, 2026 at 1:40 pm
  • added an answer I don't believe that Safari 3.2 supports rendering text in… May 11, 2026 at 1:40 pm
  • added an answer Short answer is yes a defrag would help. Clustered indexes… May 11, 2026 at 1:40 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.