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. How can i declare a global variable which can be used in the multiple projects

How can i declare a global variable which can be used in the multiple projects

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

    Hi all, I want to declare a global connection variable which can be accessed in any project of a project which has multiple projects.:)

    H U 2 Replies Last reply
    0
    • N nicolus

      Hi all, I want to declare a global connection variable which can be accessed in any project of a project which has multiple projects.:)

      H Offline
      H Offline
      Hessam Jalali
      wrote on last edited by
      #2

      you can define a member ,Property and Method as public static in one project and then reference it to all other however it going to work only when you have just one executable application (Except your Global Lib it can be exe too) and several other class libraries which all reference to one exe. but the right way is to use IPC I think, if you have several executable applications in your project which working together. and there are good articles about IPC in codeproject. hope this would help.

      1 Reply Last reply
      0
      • N nicolus

        Hi all, I want to declare a global connection variable which can be accessed in any project of a project which has multiple projects.:)

        U Offline
        U Offline
        Urs Enzler
        wrote on last edited by
        #3

        Shared configuration file?

        -^-^-^-^-^- no risk no funk ................... please vote ------>

        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