How to communicate two projects run parallel in a solution?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • longbien
    New Member
    • Aug 2010
    • 1

    How to communicate two projects run parallel in a solution?

    Hi everyone,
    I'm writing a real-time application. There are 2 projects in my solution, they run parallel. I need a project access to a field (static) in the rest when they running. How should i do?
    Best regards.
  • Christian Binder
    Recognized Expert New Member
    • Jan 2008
    • 218

    #2
    With running parallel, you mean that there are two different processes running, e.g. you're starting both .exe-files independently?
    If you're doing so, you have to use mechanismns of Inter-Process-Communication.
    Have a look here or google for e.g. c# inter process communiation.

    If you don't have two exes running, you could take usage of a static variable in one of your projects. Take any (public) class of project 1, declare a public static variable in it. Create a reference from project 2 to proj 1 and access the static variable via it's namespace, class and name.

    Comment

    • biennl
      New Member
      • May 2010
      • 1

      #3
      Hi Christian,
      Thanks for your answer. I'm also learning C# Inter-Process-Communication and i see it's all what i need.

      Comment

      • Christian Binder
        Recognized Expert New Member
        • Jan 2008
        • 218

        #4
        Fine, I wish you the best with you learning!
        Finally, I'd ask you to mark this thread as answered, if it solved your problem.

        Comment

        Working...