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


Recommended Posts

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...