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. C# singleton

C# singleton

Scheduled Pinned Locked Moved C#
3 Posts 3 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.
  • S Offline
    S Offline
    Steve Severance
    wrote on last edited by
    #1

    I need implement a singleton in C#. I have tried making a static class but I seem to be getting members that go out of scope. What is the best was to do this? Thanks. Steve

    F O 2 Replies Last reply
    0
    • S Steve Severance

      I need implement a singleton in C#. I have tried making a static class but I seem to be getting members that go out of scope. What is the best was to do this? Thanks. Steve

      F Offline
      F Offline
      Fazlul Kabir
      wrote on last edited by
      #2

      Check this link. // Fazlul


      Get RadVC today! Play RAD in VC++ http://www.capitolsoft.com

      1 Reply Last reply
      0
      • S Steve Severance

        I need implement a singleton in C#. I have tried making a static class but I seem to be getting members that go out of scope. What is the best was to do this? Thanks. Steve

        O Offline
        O Offline
        Odis Wooten
        wrote on last edited by
        #3

        Here is a really good article on the Singleton Design Pattern. Is show it in C++ and then the code convert as is to C# and then a better way of doing it in C# that takes advantage of the language. The C# way is easier. Take a look at the URL http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/singletondespatt.asp Odis Wooten odis@msn.com

        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