Well you are talking about namespaces, classes and members.. namespaces are
ONLY used to organize where classes are, logically - to a developer. A
namespace is not anything other than a grouping tool.
A "class" is really what does the work. Think of a class like a blueprint to
a house, it isn't a house, it's just the instructions on how to build a
house. So you need to create an instance of a class (i.e. build a house) for
it to exist.
So from anywhere in your program, you should be able to do:
Util.Address objAgent = new Util.Address();
objAgent.address1 = "po box 1234";
objAgent.city = "sometown";
Is this what you meant?
"Walter Riggs via DotNetMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> I've build an Address class in a "Util" namespace. I'm referencing that
> namespace in another object which needs address data (call it "Agent").
>
> It works fine, but when I access the Agent's address in code it looks
> like:
>
> agent.Address.address1
> agent.Address.city
> ...
>
> What I'm looking for is a way to build a utility class that I can plug
> into
> my Agent class so that the syntax is:
>
> agent.address1
> agent.city
> ...
>
> Any pointers?
>
> --
> Message posted via http://www.dotnetmonster.com