[英]How to share data between two projects under the same solution
I have two Windows phone projects under same solution one is of the type Background Audio Streaming Agent
and the other one is Blank App (windows phone silverlight)
I have a situation in which I need to share some data between these two projects 在相同的解决方案下,我有两个Windows Phone项目,一个是Background Audio Streaming Agent
,另一个是Blank App (windows phone silverlight)
在这种情况下,我需要在这两个项目之间共享一些数据
NB: The second project contains a reference to the first project 注意:第二个项目包含对第一个项目的引用
I have tried 我努力了
Global variables
(using static class) but found that the global variables are instantiated and are becoming null when used in the other project Global variables
(使用静态类),但是发现在其他项目中使用时,全局变量已实例化并变为空
IsolatedStorage
, found that the two projects are using separate IsolatedStorageSettings
hence the keys
and values
used in one project is not available in the other.. IsolatedStorage
,发现两个项目正在使用单独的IsolatedStorageSettings
因此一个项目中使用的keys
和values
在另一个项目中不可用。
what else can i do ? 我还可以做些什么 ?
您可以将数据保存到中央数据库。
Create a third project that contains shared operations of the two. 创建第三个项目,其中包含两者的共享操作。 Make sure the methods that you need to use are public... 确保您需要使用的方法是公开的...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.