Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Properties.Settings and accessing the values from other dlls

Status
Not open for further replies.

golcarlad

Programmer
Nov 23, 2004
232
0
0
GB
Hi,

Just wondering if there is a way I can access all my values held with my core startup project Properties.Settings file - from other projects/dlls in my Solution, as I have many errors saying:

The name 'Properties' does not exist in the current context C:\fooProject\bar.cs


TIA
Simon
 
there are many factors which could affect this.
1. is the project referenced in the current project?
no - you need to reference the project.
2. is the interface/class public?
no - then you have no way of accessing it
3. have you instanciated the object?
if it's static you don't need to instanciate it.
if it not static you need to initialize the object new Foo(); or get an instance from a factory.
4. is the property/function public?
even if you can get an instance of the object the property/function you want to access must be public.

I think there are ways to make internal objects public to outside callers, but this requires special attributes to do so. maybe in strongly named assemblies, but don't quote me on that.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top