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. C#
  4. Reference EXE - static class is empty after initialized

Reference EXE - static class is empty after initialized

Scheduled Pinned Locked Moved C#
visual-studiocsharpquestion
1 Posts 1 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.
  • N Offline
    N Offline
    nlarson11
    wrote on last edited by
    #1

    Hello, My project is creating a connection pool for a 3rd party product. I wanted to make a windows service (because of being in the IDE, it's start as a normal exe) that will control the pool. I have a static class in my windows service that is initialized upon startup of the windows service -> this class is the pool manager. Right now my attempts are referencing the windows service project in visual studio from a test project. The startup projects are the windows service and then my test project. I watch the windows service start up seeing the pool manager be initialized. When the test project creates an instance of a class inside the windows service which uses the pool, that instance claims the pool manager class isn't initialized even though it's defined as static and was intialized at windows service startup. The task manager doesn't claim another exe is running so why am I loosing the static content? Hopefully I explained the above clearly. Thank you for your time... nathan

    'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous

    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