Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Constant Module Or File ?

Constant Module Or File ?

Scheduled Pinned Locked Moved Visual Basic
csharpsysadminxmlquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    barney_1972
    wrote on last edited by
    #1

    When i first started VB6 i used to hard code constants into a separate Module. Then i moved on to using an ini file instead as this allowed me to change server paths and server names plus other info without the need for recompiling code. Now i'm onto and new to VB.NET i want to adopt a good practise and have started using an xml file instead which i then read into the application to initialise certain system properties. What i want to know is what other people are doing or is there a better standard that folks are using? Many Thanks

    T 1 Reply Last reply
    0
    • B barney_1972

      When i first started VB6 i used to hard code constants into a separate Module. Then i moved on to using an ini file instead as this allowed me to change server paths and server names plus other info without the need for recompiling code. Now i'm onto and new to VB.NET i want to adopt a good practise and have started using an xml file instead which i then read into the application to initialise certain system properties. What i want to know is what other people are doing or is there a better standard that folks are using? Many Thanks

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      don't know if this exist in 2003 but in 2005 there is a tab 'settings' on the properties of you'r project here you can give a settingname, type, scope and value this does exactly the same as what you do with the plus side that you can access these 'settings' in code like this: my.Settings.nameofsetting it basacly creates a xml file wich can be opened in notepad to alter it I always use this

      If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.

      B 1 Reply Last reply
      0
      • T Tom Deketelaere

        don't know if this exist in 2003 but in 2005 there is a tab 'settings' on the properties of you'r project here you can give a settingname, type, scope and value this does exactly the same as what you do with the plus side that you can access these 'settings' in code like this: my.Settings.nameofsetting it basacly creates a xml file wich can be opened in notepad to alter it I always use this

        If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistaks.

        B Offline
        B Offline
        barney_1972
        wrote on last edited by
        #3

        :-DExcellent, thanks. Just the thing i was looking for.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups