Static property won't stay set?
c#
Solution
A static property has one instance per process (technically, per `AppDomain`). If you're trying to share it between two executables, each process will get a unique value.
If you want to communicate between two executables, you'll need to use some form of Interprocess Communication, or serialize to some external source (the file system, a database, etc).
Problem
I want to share a property between two projects in the same solution, so I created a simple static class in a separate (third) project with a static property. However, when I set it in one project, the change doesn't seem to occur when I try to get the value of the property from the other project. Since the property is static shouldn't there only be one instance of it? I've debugged and the value is indeed set after the assignment statement, why doesn't this apply when its referenced in the other project? Here's the code: ``` namespace Shared { public static class Shared { public static string old { get; set; } } } ``` Assignment statement in first project ``` Shared.Shared.old = messageData.Items[0].DateTime; ``` Trying to access property in 2nd project ``` if (messageData.Items[0].DateTime.CompareTo(Shared.Shared.old) > 0) ```