Click to See Complete Forum and Search --> : Accessing resources across a projects


wdhough
May 31st, 2007, 09:15 AM
Hi, I have two projects, proj1 and proj2.



Proj2 references Proj1 so i have access to all of proj1's classes and objects from proj2.



I have added resources to Proj1, something simple at the moment, just a string called TestString.



From within any class in proj1, i can access my string by simply saying

Proj1.Properties.Resources.TestString.



However when i try to do this from proj2 like this

Proj1.Properties.Resources.TestString.



i get the following error

Proj1.Properties.Resources is inaccessible due to its protection level .



Can anyone tell me how to get around this?



thanks



Will

Talikag
May 31st, 2007, 09:36 AM
It's simply inaccessible, you just can't access it. You can either create in proj1 a class which will contain all the references you need. Then you'll be able to accessa it, just like this:

proj1.MyRefrencesClass.TestString

Or simpy look at the proj1's resources and try to make it accessable somehow...