BestTechie Forums: How to share a global static variable between two different instances of an exe file (.NET) - BestTechie Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to share a global static variable between two different instances of an exe file (.NET)


#1 User is offline   Dileep Kumar Uppiretla 

  • Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 22-July 11

Posted 22 July 2011 - 02:14 PM

I have a console .exe file. Two windows scheduled tasks are created for the same .exe file with two different command line arguments for each. These tasks run in parallel. I've a variable which should be shared b/w these two tasks i.e. if the variable is initialized in a task, the second task should use the same value without initialzing it again. I've tried implementing singleton pattern, but it didn't work.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

  1. Yahoo